Click to open or copy the files for the Simple sample.
This sample is a simple TCP/UDP server. It listens on a specified port for client connections. When a client connects, the server receives data, echoes it back to the client and closes the connection.
This sample uses the following keywords:
accept; atoi; bind; closesocket; connect; exit; fd_clr; fd_isset; fd_set; fd_zero; fprintf; gethostbyaddr; gethostbyname; htons; inet_addr; inet_ntoa; ioctlsocket; isalpha; listen; memcpy; memset; printf; readandecho; recv; recvfrom; select; send; sendto; socket; stricmp; switch; tolower; usage; writemessage; wsacleanup; wsagetlasterror; wsastartup; wsprintf