BPX4LSN (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 BPX4SOC. 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 31 callers use BPX1LSN (listen) example.
                                              
         CALL  BPX4LSN,              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                       +
               MF=(E,PLIST)          ----------------------------------