BPX4STO (sendto) example
The following code issues a sendto for a socket. SOCKDESC
was returned from a previous call to either BPX4SOC or BPX4ACP.
For the callable service, see sendto (BPX1STO, BPX4STO) — Send data on a socket.
For the data structures, see BPXYSOCK — Map SOCKADDR structure and constants and BPXYMSGF — Map the message flags.
AMODE 31 callers
use BPX1STO (sendto) example.
MVC BUFFERA(16),=CL16'Here is the data'
LA R2,BUFFERA
STG R2,IOV_BASE
MVI IOV_LEN,16
SPACE ,
CALL BPX4STO, Send data to a socket +
(SOCKDESC, Input: Socket Descriptor +
=A(L'BUFFERA), Input: Length of the input buffer +
BUFFERA, Input: input buffer +
PRIMARYALET, Input: Alet of the input buffer +
MSG_FLAGS, Input: Flags +
=A(L'SOCKADDR), Input: Length of the socket addr +
SOCKADDR, Input: The socket address +
RETVAL, Return value: 0 or -1 +
RETCODE, Return code +
RSNCODE), Reason code +
MF=(E,PLIST) ----------------------------------