client

Description

This sample program tests the RTX TCP/IP protocol stack by sending packets to a server and waiting for a response.

Source Files

client project source file:

Build the Sample

  1. Open the solution in the desired Visual Studio version you wish to build.
  2. Once Visual Studio is open, build the sample in any desired configuration that is available.

Run the Sample

  1. Have the Server sample running on a separate machine that can be reached through the network from the machine running this executable.
  2. Run this Program to send packets to the server.

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.

Usage

client.exe i= destination ip_address [options]

Options

p = Port Number (default=9999)

s = packet size (default=1024)

c = connection loops (default=1)

m = message loops (default=10000)

f = v4 or v6 (default=v4)

k Kill the server. TCP only.

l = use large packets (default = 1).

n = Nagle Alg. 0 = Disabled(default), 1 = Enabled

b = include and count first 500 packets (default b=0 do not include)

t = Source_MAC_address Destination_MAC_address(default = disabled)

/udp Use udp rather than tcp (default).

APIs Referenced

RTAPI

Win32 APIs

Winsock BSD APIs

RealTime Network APIs

RtAttachShutdownHandler

RtCloseHandle

RtGetClockResolution

RtGetClockTime

RtOpenSharedMemory

RtPrintf

ExitProcess

GetLastError

Sleep

connect

closesocket

freeaddrinfo

recv

select

send

setsockopt

shutdown

socket

WSAStartUp

WSAGetLastError

WSACleanup

RtnAllocateFrame

RtnDecodePacket

RtnTransmitFrame

See Also

Client

IntervalZero.com | Support | Give Feedback