TCP protocol issues

Category: VC/MFC -> Network Author: forever_up Date: 2004-07-20 22:28:54
2004-07-20 22:28:54
When using the TCP protocol programming , send () function Why not send a zero length byte ? If you send a 0 byte length which function should we use ? Programming novice question , do not laugh ! ! !
2004-07-20 22:59:33
0 lengths .
But what use is it ?
2004-07-20 23:25:49
For tcp, should be understood as the flow should not be construed as a package.
added to a 0 byte length stream of content , did not mean to do anything
2004-07-20 23:57:28
I send 0 byte stream , in order to trigger what equipment , if > 0 byte as data transmission , the printer will print as the data , send () function I have tried, it seems not. Then advise ! ! !
2004-07-21 00:17:36
you look at the definition of the IP header and the TCP header to know, length can be zero , but it contains the zero-length Ethernet and IP header is the same and sent to members in the past , but the TCP header the length of the back of the data is 0 , the equivalent of not, you can use raw sockets or packet capture tool to analyze what became clear
2004-07-21 00:45:11
possible. To use send ah.
2004-07-21 01:09:06
should be able , in the try.
2004-07-21 01:35:27
byte stream is itself no fixed length
so you can send zero-length byte stream