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

Message Framing Fails When Sending Data Quickly #15

Open
AlexArchive opened this issue Jul 2, 2013 · 0 comments
Open

Message Framing Fails When Sending Data Quickly #15

AlexArchive opened this issue Jul 2, 2013 · 0 comments

Comments

@AlexArchive
Copy link

When receiving a lot of messages from a client application in quick succession: The server will throw one of the following exceptions:

Invalid Data Version (your validation)
Message Length Negative (your validation)
Some Serialization Issue (due to invalid stream of bytes) (BinaryFormatter)

The problem is that when sending a lot of messages very quickly the message framing messes up. The bytes are received in the wrong order.

The exception thrown depends on "luck" really if what the client perceives to be the length prefix is converted to a positive integer, the message length negative exception will not be thrown; else, it is.

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

1 participant