Hi,
I have seen many version of C# code that should handle a TCP buffer on this forum, but as far as I could see, none of them worked properly. A TCP buffer can have multiple packets or partial packets in 1 batch, and not any version I saw could handle them properly. So I wrote some code that is uncrashable and works with any buffer size, even a 1 byte buffer. I included an example. I just thought it might be helpful. Comments and improvement suggestions are welcome.![](/static/smilies/smile.gif)
Thanks,
Ron
I have seen many version of C# code that should handle a TCP buffer on this forum, but as far as I could see, none of them worked properly. A TCP buffer can have multiple packets or partial packets in 1 batch, and not any version I saw could handle them properly. So I wrote some code that is uncrashable and works with any buffer size, even a 1 byte buffer. I included an example. I just thought it might be helpful. Comments and improvement suggestions are welcome.
![](/static/smilies/smile.gif)
Thanks,
Ron