|
-
Sep 12th, 2005, 09:22 PM
#1
Thread Starter
New Member
VB.NET Socket
I am using VB.NET socket class to create a socket program, what happened is when I use hyperterminal to send data "chr(11) & <data> & chr(13) & chr(28) & chr(13)" to the listener, but I received in 2 or more packets, firstly, I received chr(11), subsequently then I received the rest, anyone can share with me why it is happened in such a way?
-
Sep 14th, 2005, 02:23 PM
#2
Lively Member
Re: VB.NET Socket
For such a small packet that is odd, but not uncommon. TCP packets are split up in most cases, although it generally "waits" a very short time before sending a packet to look for any other data that is to be sent. In this case, it looks like for whatever reason it has decided to "split" up the transmission.
Good parsing on your side will take this in to account and buffer incomplete data. An example is with the IRC chat protocol - I look for terminating VBLF's and if there is not one at the end of the packet, it searches for the data after the last known LF and buffers it for later.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|