Skip to main content

6. CHECK

This operation causes the status of the specified local socket to be returned. There is no completion code variable associated with this operation, since it is always successful and the socket is identified by its socket number. This operation is valid at any time and is always completed immediately.

The calling sequence is as follows:

CALL @CHECK(lclsck, stat, mnem, fgnsck, deficit);

where

  • lclsck is the socket identifier of the local socket.
  • stat is a code for the status, and has the attribute BINARY FIXED(31,0).
  • mnem is a mnemonic for the status, and has the attribute CHARACTER, of any fixed length greater than or equal to eight. If mnem is longer than eight bytes, it will be padded to the right with blanks.
  • fgnsck is the socket identifier of the foreign socket, or zero.
  • deficit is the send/receive deficit in bits, or zero, and has the attributes BINARY FIXED(31,0).

lclsck is the only argument the programmer need define; the others are output from the subprogram.

Status Codes​

Following are the possible status codes, together with their mnemonics and interpretations:

STATMNEMMeaning
0OPENA connection is fully established. No SEND/RECEIVE operation is in progress. fgnsck is the socket identifier of the connected socket. deficit is the number of bits queued locally at the socket by the NCP and available to satisfy a future RECEIVE operation, or awaiting output as the result of a previous SEND operation.
1LISTENA LISTEN has been issued.
2CONNECTA CONNECT has been issued. fgnsck is the socket identifier of the foreign socket.
3DECISIONA LISTEN has been completed. fgnsck is the socket identifier of the calling socket.
4CALL(S)One or more calls have been received for the local socket. No LISTEN or CONNECT has been issued.
5I/OA connection is fully established. A SEND/RECEIVE operation is in progress. fgnsck is the socket identifier of the connected socket. deficit is the number of bits yet to be sent or received.
6CLOSEDThe socket is in the closed state.
7<--DRAINThe foreign socket is attempting to close the connection. The NCP has data yet to be read by the local socket. fgnsck is the socket identifier of the connected socket. deficit is the number of bits yet to be received.
8DRAINEDThe foreign socket is attempting to close the connection. The NCP is awaiting arrival at the foreign site of data currently in transit. fgnsck is the socket identifier of the connected socket.
9CLOSINGThe local socket has issued a CLOSE. The NCP is in the process of returning the local socket to the closed state. fgnsck is the socket identifier of the connected socket.
10DRAIN-->The local socket has issued a CLOSE. The NCP is completing the last SEND operation before returning the local socket to the closed state. fgnsck is the socket identifier of the connected socket. deficit is the number of bits the NCP has yet to transmit.