BrandonPotter / SimpleTCP

Straightforward .NET library to handle the repetitive tasks of spinning up and working with TCP sockets (client and server).
Apache License 2.0
363 stars 108 forks source link

Message Framing #40

Open vdidxho opened 6 years ago

vdidxho commented 6 years ago

First off, I really appreciate the simplicity of this project. Thanks for sharing it with us.

I quickly got client and server working well sending byte data with Write() and DataReceived(). Am I correct in assuming that Delimiter is currently the only option available for assembling the packets and Length prefixing is not implemented?

After reading this article it seems to me I need to be concerned with the DataReceived event returning partial byte data due to having been split into many packets and network lag. However in my testing after sending a large byte array which was broken into many packets that took ~20 seconds, the byte array returned fully in one DataReceived event. What am I missing here?