BPX4RCV (recv) example
The following code issues a recv for a socket. SOCKDESC
was returned previously from a call to either BPX4SOC or
BPX4ACP. For the callable service, see recv (BPX1RCV, BPX4RCV) — Receive data on a socket and store it in a buffer.
For the data structures, see BPXYSOCK — Map SOCKADDR structure and constants and BPXYMSGF — Map the message flags.
AMODE 31 callers use BPX1RCV (recv) example.
SPACE ,
CALL BPX4RCV, Receive data on from a socket +
(SOCKDESC, Input: Socket Descriptor +
=A(L'BUFFERA), Input: Length of input buffer +
BUFFERA, Input: Address of input buffer +
PRIMARYALET, Input: Alet of input buffer +
MSG_FLAGS, Input: Flags +
RETVAL, Return value: 0 or -1 +
RETCODE, Return code +
RSNCODE), Reason code +
MF=(E,PLIST) ----------------------------------