T/TCP-enabled Client & Server


The T/TCP client and server codes were written by W. Richard Stevens. You can download them here or check out the "cliserv" module from our CVS repository.

Here is the comparison of T/TCP-enabled client and server codes with standard TCP ones (click here to download).

T/TCP client doesn't use "connect( )", but uses "sendto( )" directly. "sendto( )" connects to the server and sends a request simultaneously with only one packet.
Pay attention: we choose a new flag "MSG_EOF" as the 4th argument of "sendto( )", which signals to the kenel the end of the user's data. As a result, this special "sendto( )" sends one packet with SYN + data + FIN. In other words,"sendto( )" performs the funtions of "connect( )", "write( )" and "shutdown( )".

There is only one difference:
T/TCP server uses "send( )" instead of "write( )". Thus, by setting "send( )" 4th argument to MSG_EOF, the server sends the response together with FIN flag in one packet.

T/TCP Client & Server Transaction Time Sequence Graph