//====================================================== file = udpPong.c ===== //= A UDP ping server that listens on for "PING" and returns "PONG" = //============================================================================= //= Notes: = //= 1) This program conditionally compiles for Winsock and BSD sockets. = //= Set the initial #define to WIN or BSD as appropriate. = //= 2) This program listens on port PORT_NUM for a "PING" message and then = //= returns a "PONG" message = //= 3) Ignore build warning for unreachable code = //=---------------------------------------------------------------------------= //= Example execution: (udpPing and udpPong running on host 127.0.0.1) = //= Waiting for PING on port 1024... = //= Received PING from address = 127.0.0.1 and port = 55476 = //=---------------------------------------------------------------------------= //= Build: = //= Windows (WIN): Borland: bcc32 udpPong.c = //= MinGW: gcc udpPong.c -lws2_32 -o updPong = //= Visual C: cl ucpPong.c wsock32.lib = //= Unix/Mac (BSD): gcc ucpPong.c -lnsl -o ucpPong = //=---------------------------------------------------------------------------= //= Execute: udpPong = //=---------------------------------------------------------------------------= //= Author: << YOUR NAME >> = //= University of South Florida = //= Email: << YOUR EMAIL ADDRESS >> = //=---------------------------------------------------------------------------= //= History: << YOUR INITIALS >> (09/__/18) - Genesis (from udpServer.c) = //=============================================================================