RtTcpipServer

Description

TCP/IP Server program monitors for connections on a TCP/IP port. Can be used in conjunction with the RtTcpipClient sample.

Source Files

RtTcpipServer project source file:

Options

Option Description

i=

Source IP address in dot notation (if needed)

f=v4,v6

v4= IPv4(AF_INET) as address family

v6= IPv6(AF_INET6) as address family

Note: This is required for IPv6 addresses if the i= option is not specified.

n=0,1

0=disable Nagle Algorithm (default), 1=Enable Nagle Algorithm

Note: Both the client and the server must have the use of the Nagle Algorithm in the same state. Either both have the Nagle Algorithm disabled or both have the Nagle Algorithm enabled.

p=nn

Port number (default is 9999)

r=nn Report processed packets at an interval of every nn number of loops (default is 500)

/udp

Use UDP instead of defaulting to TCP

/s

Use single threading (multi-threaded is the default)

/silent No printouts will occur after initialization
t=nn Select timeout in ms. used with UDP send (default is 1000)
w=nn Socket window size (SO_SNDBUF and SO_RCVBUF) options

/?

Displays usage

Remarks

The server program can be built as an .rtss or .exe executable binary file and run in the real-time or Windows environment.

If a UDP socket is not bound to an IP address, and the system has configured several IP addresses on the same subnet as the destination IP address (or the route to the destination), UDP datagrams will be sent using the first IP address configured for this subnet.

APIs Referenced

RTAPI

Supported Windows API

Winsock BSD API

See Also

RtxTcpServer