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