This is an attempt to address some TCP/IP frequently asked questions and present best practices. While the WinSock Programmer's FAQ will remain the ultimate FAQ for native code, there is a growing need for a simplified version that addresses the managed interface to TCP/IP sockets.
Section 1 - Application Protocol Design
1.1 - Message framing, also known as:
"One side sent X bytes, but the other side only got Y bytes."
"One side sent several packets, but the other side only got one packet, which was all the sent packets appended together."
"I need the function that will send exactly one packet of data."
1.2 - Detection of half-open (dropped) connections, also known as:
"My socket doesn't detect a lost connection; it just sits there forever waiting for more data to arrive."
1.3 - Application Protocol Specifications
1.4 - XML over TCP/IP