In the AF_ISO domain, only the soc_close() function is available for terminating a connection. The connection is completely aborted upon the first call of soc_close() for the socket of a connection end point. Data not yet fetched on the partner side is lost. Connection termination data, which was previously entered in the socket (see getsockopt(), setsockopt() in section "getsockopt(), setsockopt() - get and set socket options") can however be transmitted with the soc_close() function.
Terminating a connection (“abortive”) using soc_close()
The following steps are carried out:
If required, server S writes connection termination data to the socket using the TPOPT_DISC_DATA option of the setsockopt() function.
If the server calls the soc_close() function, the “abortive disconnect” is initiated. Here is no read or write access to the socket in server S now. The partner socket in client C is informed of the “abortive disconnect”. If available, the data referring to the termination of the connection is transmitted. The socket in server S is closed.
Once the signal for “abortive disconnect” has been received, the client C application program can read the connection abort data, if this has been transmitted from the server. The user program can no longer read any other data. Any existing data that has not yet been fetched from the transport system is lost.
Client C can therefore only respond to the signal of S with soc_close() and thus close the socket in C.