TCPIP Sample

This sample includes a simplified TCP server, a simplified blocking TCP client, and a simplified non-blocking TCP client.

Running the Sample

Rtssrun TCPIPServer.rtss

Note: This sample will choose the first interface IP. If you are using the Virtual Network, and you want to use an actual Network Interface Card for this sample, disable the Virtual NIC.

Rtssrun TCPIPClient.rtss <server IP Address>

Output

The output of TCPIPServer should look like this:

*** TCPIPServer: WinSock started ***
Bytes received: 13
Bytes sent: 13
Connection closing...

The output of TCPIPClient and TCPIPClientNblock should look like this:

*** TCPIPClient: WinSock started ***
Bytes Sent: 13
Bytes received: 13
Connection closed

APIs Referenced

RTAPI

Supported Windows API

Winsock BSD API

See Also