srx_np callable service sends or receives data on a socket
using CSM buffers. The following example receives data into CSM
buffers. The MSGXNAMEPTR is set up to point to a buffer to receive
the source address of the data. The MSGXIOVX is an IVTBUFL
structure, which describes an IOVX array in a CSM buffer. The
IOVX array contains IVTBUFL structures, each of which describes
a CSM buffer with data that was received. SOCKDESC is a socket
descriptor that was returned from a previous call to either
BPX1SOC or BPX1ACP. For the data structures, see
BPXYSOCK — Map SOCKADDR structure and constants and
BPXYMSGX — Map the message header.
For the callable
service, see
srx_np (BPX1SRX, BPX4SRX) — Send or receive CSM buffers on a socket.
AMODE 64 callers use
BPX4SRX (srx_np) example.
XC MSGX(MSGX#LEN),MSGX Clear msgx storage
LA R2,SOCKADDR
ST R2,MSGXNAMEPTR Store the address of sockaddr
LA R2,SOCK#LEN+SOCK_SIN#LEN
ST R2,MSGXNAMELEN Length of sockaddr buffer
SPACE ,
CALL BPX1SRX, Receive data in CSM buffers +
(SOCKDESC, Input: Socket Descriptor +
MSGX_RECV, Input: Direction +
L'MSGX, Input: Msghdrx length +
MSGX, Input: Msghdrx +
RETVAL, Return value: -1 or bytes read +
RETCODE, Return code +
RSNCODE), Reason code +
VL,MF=(E,PLIST) ----------------------------------