Connection termination notification for sockets

In z/OS® V2R1 Communications Server, an application can issue a synchronous or an asynchronous receive socket API call that completes only when a TCP connection is ended.

This support is available on the recv(), recvfrom(), and recvmsg() functions in the z/OS XL C/C++ Runtime Library. The support is also available on the recv(BPX1RCV, BPX4RCV), recvfrom(BPX1RFM, BPX4RFM), recvmsg(BPX2RMS, BPX4RMS), and asyncio(BPX1AIO, BPX4AIO) assembler callable services.

Restriction: This enhancement is supported for TCP sockets, but not for UDP or RAW sockets.

Receiving notification of the termination of a socket connection

To receive a notification when a socket connection is terminated, perform the task in Table 1.
Table 1. Connection termination notification for sockets
Task Reference
Issue the receive socket call with the flag value MSG_CONNTERM.