RtTcpipClient
Description
This sample program tests the RTX64 TCP/IP protocol stack by sending packets to a server and waiting for a response. It is a simple client application used for testing the RTX64 TCP/IP protocol stack.
Source Files
client project source file:
RtTcpipClient.c
Attaches a shutdown handler for the process, sets defaults for TCP/IP parameters, checks and prints test parameters, initializes a packet to send, and then starts a loop to send packets and wait for response.
Remarks
The client.c program can be built as an .rtss or .exe executable binary file and run in the real-time or Win32 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.
Usage
client.exe i= destination ip_address [options]
Options
Option | Description |
---|---|
a=<ip> switch | Specify an IP address to bind the client socket to. |
b=0,1 |
0=don't include the first 500 packets in performance metrics (default), 1=include the first 500 packets |
c= |
Connection loops (default=1) |
g=(1 or 0) | This option only affects result printouts (default is 1). Use g=0 if you are running 100 MB or 10 MB connection. |
i= |
Destination IP address in dot notation. If multicast mode is selected, then the multicast IP address should be specified instead of the actual server IP address. |
k |
Kill the server; remote shutdown of the Server |
m= |
Message loops (default=10000) |
n=0,1 |
0=disable Nagle Algorithm, 1=Enable Nagle Algorithm (default) Note: Both the rttcpip client and the rttcpipserver 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. |
o= | Scope Id of local IPv6 address |
p=nn |
nn port number (default is 9999) |
r=nn | Calculate and print the report at an interval of every nn number of loops (default is 500) |
s=packet size |
Packet size sent (default=1024 )in bytes. |
e=nn | Limits data size of send call |
/? |
/? displays usage |
/silent | No printouts will occur after initialization |
t=nn | Select timeout in ms. used only with UDP send (default is 1000) |
/udp |
Use UDP instead of defaulting to TCP |
w=nn | Socket window size (SO_SNDBUF and SO_RCVBUF) options |
APIs Referenced
RTAPI |
Win32 APIs |
Winsock BSD APIs |
See Also