kerryjiang / WebSocket4Net

A popular .NET WebSocket Client
Apache License 2.0
771 stars 274 forks source link

send multiple message error #42

Open neo125874 opened 8 years ago

neo125874 commented 8 years ago

I'm using WebSocketListener for server and WebSocket4Net for client, and the application is working with a robot, if the client typing so quickly then it will show the error "無法從傳輸連接讀取資料: 遠端主機已強制關閉一個現存的連線。";

Is this kind of problems causing by library or because of the websocket couldn't send & receive at the same time?

Thanks.

kerryjiang commented 8 years ago

Where did you get this error? Server side or client side? Do you have the exception's full stack trace?

neo125874 commented 8 years ago

i got this in the client-side, it occurred when call websocket.send multiple times, and i guess the robot probably was sending back some answers at the mean time;

i don't have the full stack trace, it showed at the websocket.Error += new EventHandler so i have no idea about which step will cause this error,

thanks.

neo125874 commented 8 years ago

occurred at this following method, private static void websocket_Error(object sender, SuperSocket.ClientEngine.ErrorEventArgs e) { Console.WriteLine(e.Exception.Message); }

kerryjiang commented 8 years ago

From the error message, it looks like a server side issue.

Probably you can get more details of this problem by tracing the network communication directly.