Click to open or copy the files for the Listen sample.
Click to open or copy the Testlib directory (required).
The Listen sample has two versions, in two subdirectories: Block, and Nonblock.
This sample demonstrates NWLink. It is a simple example of opening a SPX socket, binding to the socket, and listening for a connection.
This sample uses the following keywords:
accept; bind; closesocket; do_listen; do_recv_send; dos_net_perror; exit; free; getsockname; listen; makeword; malloc; memcpy; net_init; parse_cmd_line; print_netaddr; print_saddr; print_wsa; printf; recv; send; socket; wait_for_connection; wsastartup; accept; bind; closesocket; do_listen; do_recv_send; dos_net_perror; exit; free; getsockname; ioctlsocket; listen; makeword; malloc; memcpy; net_init; parse_cmd_line; print_netaddr; print_saddr; print_wsa; printf; recv; send; sleep; socket; wait_for_connection; wsastartup