I am facing an issue with my websocket server and client setup. I have a websocket server written in c# and a simple client to test it.
The handshake is successful, triggering the onopen event in the client. However, when I try to send data to the client, it seems to ignore it.
For example:
byte[] data = Encoding.UTF8.GetBytes(text);
clientSocket.Send(data);
The client never triggers the onmessage
event when data is sent.
I have attempted various solutions such as appending 0x00
at the beginning and 0xFF
at the end of the message, as well as sending an array of bytes with byte[0] = 0x00
at the start, followed by the message, and then byte[0] = 0xFF
. However, none of these methods have made any difference.
If anyone has any insights or possible solutions to this problem, I would greatly appreciate it.