メインコンテンツまでスキップ

5. Check(チェック)

この操作は、指定されたローカルソケットの状態を返します。この操作には完了コード変数は関連付けられません。常に成功し、ソケットはそのソケット番号によって識別されるためです。この操作はいつでも有効であり、常に直ちに完了します。

呼出しシーケンスは次のとおりです。

CALL CHECK (lclsck, stat, menu, fgnsck, deficit)

ここで

'lclsck' は、ローカルソケットのソケット識別子です。

'stat' は状態を表すコードであり、INTEGER*4 型です。

'mnem' は状態のニーモニックであり、任意の型で、長さは 8 バイト以上であれば任意です。

'fgnsck' は、相手ソケットのソケット識別子、または 0 です。

'deficit' はビット単位の送受信差額、または 0 であり、INTEGER*4 型です。

'lclsck' はプログラマが定義すべき唯一の引数であり、その他はサブプログラムからの出力です。

   'STAT'    'MNEM'         MEANING
   ------    ------         ---------
     0        OPEN         A 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
                           bites queued locally at the socket by the NCP
                           and available to satisfy a future RECEIVE
                           operation, or awaiting output ads the results
                           of a previous SEND operation.

     1       LISTEN        A LISTEN has been issued.

     2       CONNECT       A CONNECT has been issued. 'fgnsck' is the
                           socket identifier of the foreign socket.

     3       DECISION      A LISTEN has been completed.  'fgnsck' is
                           the socket identifier of the calling socket.

     4       CALL(S)       One or more calls have been received for the
                           local socket. No LISTEN or CONNECT has been
                           issued.

     5       I/O           A 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.

     6       CLOSED        The socket is in the closed state.

     7      <--DRAIN       The foreign socket is attempting to close the
                           connection.  The NCP has data yet to be ready
                           by the local socket.  'fgnsck' is the socket
                           identifier of the connected socket.
                          'deficit' is the number of bits yet to be
                           received.

     8       DRAINED       The 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.

     9       CLOSING       The 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.

    10       DRAIN-->      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.