DGrecv: Receive Packet

Click to open or copy the files for the DGrecv sample.

Click to open or copy the Testlib directory (required).

This sample opens a socket, binds to the socket, and waits for a datagram packet.

Building SDK Samples

This sample uses the following keywords:

bind; closesocket; dg_recv; dos_net_perror; exit; free; getsockname; makeword; malloc; memcpy; net_init; parse_cmd_line; print_netaddr; print_saddr; print_wsa; printf; recvfrom; setsockopt; socket; wsastartup