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 a CONNECT, the attempt is aborted. If a connection is established, any data in transit form the local socket is allowed to reach the foreign socket and to be either received or flushed before the local socket is closed.
Processing at the terminal is suspended until the socket has been returned to the closed state.
The key sequence is as follows:
DWN Q
where
- Q is the completion code variable associated with the local socket.
The following completion codes are possible for this operation:
| Code | Meaning |
|---|---|
| 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 |