Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The length of payload data of a control frame is greater than 125 bytes. #77

Open
brennick opened this issue Sep 16, 2014 · 5 comments
Open

Comments

@brennick
Copy link

I am trying to send data from websocket-sharp to a https://github.com/statianzo/Fleck server and it will not send a large amount of data over websockets. The byte length of the message is close to 16000, so I am not sure if that is absolutely too large or if there is a way to send it in multiple messages.

Also should mention that it seems to send data when it is past 125 bytes normally...I have sent 251 bytes, 300 bytes, 287 bytes

@brennick
Copy link
Author

error
Here is a image of the error message.

@sta
Copy link
Owner

sta commented Sep 17, 2014

Could you show me your client side code?

And that error occurs when the client receives a control frame (ping, pong, or close frame) that has a payload data which is greater than 125 bytes.

So, you should know what control frame does your Fleck server send to the client after the server receives those data.

@brennick
Copy link
Author

The issue went away...not sure why. I'll let you know if it happens again.

@maiksaray
Copy link

I've got the same issue when sending message with string length 75695. It's pretty big message, but should be still valid. I get the same exception on NetworkStream.Write(). I am working on client app. Our server uses java Play-Framework built-in WebSockets. Network Monitor shows that data is not even sent to remote host yet.

I'm not that good at websocket standarts and stuff, but it seems like exception happens when writing final segment of a fragmented message ( send (Fin.Final, Opcode.Cont, buff, compressed); WebSocket.cs : 1227 )

The issue does not go away.
Here s exception info. Sorry for non-english messages, it's framework locale. It says "NetworkStream Write Exception: An established connection was aborted by the software in your host machine"
image
Here's callstack

websocket-sharp.dll!WebSocketSharp.WebSocket.sendBytes(byte[] bytes) Line 1270 C#
websocket-sharp.dll!WebSocketSharp.WebSocket.send(WebSocketSharp.Fin fin, WebSocketSharp.Opcode opcode, byte[] data, bool compressed) Line 1238 C#
websocket-sharp.dll!WebSocketSharp.WebSocket.send(WebSocketSharp.Opcode opcode, System.IO.Stream stream, bool compressed) Line 1226 C#
websocket-sharp.dll!WebSocketSharp.WebSocket.send(WebSocketSharp.Opcode opcode, System.IO.Stream stream) Line 1164 C#
websocket-sharp.dll!WebSocketSharp.WebSocket.Send(string data) Line 2189 C#

@ManhVu90
Copy link

I've got the same issue when sending picture 19kb.
So is there any other way to send the picture?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants