UDP

Description

This sample contains two executables. The Server, when executed, will wait until it receives a set amount of bytes followed by a signal to shut down. The program will display the number of bytes sent and then end its process. The Client will send a set amount of bytes to an IP address and then end its process. This is all done in TCP protocol.

Source Files

Source\

VS2010\

VS2012\

ReadMe.txt

Running the Sample

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.

Launch RtssRun and type the following:

Rtssrun UDPServer.rtss

Rtssrun UDPClient.rtss <server IP Address>

APIs Referenced

RTAPI

Windows APIs

Winsock BSD APIs

RtPrintf

CloseHandle

CreateThread

ExitProcess

ExitThread

GetLastError

GetProcessHeap

HeapAlloc

Sleep

bind

closesocket

freeaddrinfo

getaddrinfo

recvfrom

sendto

socket

WSACleanup

WSAStartUp

See Also

TCPIP

RtTcpipClient

RtTcpipServer