Skip to main content

3. CLOSE

This operation is a request that the specified local socket be returned to the closed state. If the last operation involving this socket was a LISTEN, this operation refuses the foreign process' connection attempt. If the last operation was a CONNECT, the attempt is aborted. If a connection is established, any data in transit from the local socket is allowed to reach the foreign socket and to be either received or flushed before the local socket is closed. The subprogram will wait until the socket has been returned to the closed state.

The calling sequence is as follows:

CALL @CLOSE(cmpcd, time);

where

  • cmpcd is the completion code variable associated with the local socket.
  • time is the length of time the subprogram is to wait for the completion of the operation.

The following completion codes are possible for this operation:

CodeDescription
0The operation was successful, and the socket has been returned to the closed state
8The specified completion code variable is not currently assigned to a socket; the operation was suppressed
12The specified local socket is in the process of being closed; the operation was suppressed, but the local socket will be closed
36Either hardware at the foreign site is inoperative, or the NCP's counterpart at the foreign site does not exist or has failed
44By operator command, all Network operations were terminated; the socket will be closed
60An NCP control transmission error occurred; the operation was aborted
64A transmission error occurred; the operation was aborted, but the socket will be closed
252The specified time limit was exceeded; the operation was initiated but not completed