BPX1LSN (listen) example
The following code issues a listen on a socket that was
previously created and that had a bind done for it. SOCKDESC was
returned from the call to BPX1SOC. Set the backlog count to 5. For
the callable service, see listen (BPX1LSN, BPX4LSN) — Prepare a server socket to queue incoming connection requests from clients. For the
data structure, see BPXYSOCK — Map SOCKADDR structure and constants. AMODE 64 callers
use BPX4LSN (listen) example.
CALL BPX1LSN, Listen on a socket +
(SOCKDESC, Input: Socket Descriptor +
=A(5), Input: Backlog count of 5 +
RETVAL, Return value: 0 or -1 +
RETCODE, Return code +
RSNCODE), Reason code +
VL,MF=(E,PLIST) ----------------------------------