Toshiba T2N Network Card User Manual


 
109
6 F 3 B 0 3 6 2
8. TCP close request (using the SEND instruction)
a. Function
Close the open TCP socket.
Release the (unlimited wait state) receive request and terminate the TCP socket.
b. Transfer parameters
A 3100H
Module designation
A+1 CMD = 0039H
Command number
A+2 SportNO
Socket identifier (1 to 8)
c. Status (See figure 4.3 for details on bits C, D, E and F.)
F E D C B A 9 8 7 6 5 4 3 2 1 0
B SportNO TermSTS
B+1 Detailed information (Only valid when TermSTS = 0BH.)
d. Important items
TCP close requests are processed with the highest priority and other executing requests are
discarded, even if the object socket is executing a TCP open, send, or receive request. Other
requests during the execution of this request will be discarded.
An error is returned if a close request is issued for a socket that is not yet opened.
Status: Transmission error (TermSTS = 0BH)
Detailed information: Unopened (0081H)
An error is returned if a value other than 1 to 8 is specified as the socket identifier.
Status: Transmission error (TermSTS = 0BH)
Detailed information: Illegal socket identifier (0082H)
A TCP receive requests will result in an error being returned if an unlimited wait state
TCP open request/receive request is terminated with this request.
Status: Transmission completion timeout (TermSTS = 06H)
Supplement:
The T2N sees its requests (module control and socket interface transmission) to the Ethernet
Port as being "transmission" requests. As a result, when a request is forcibly terminated and a
response is not received from the Ethernet Port, the result is a send request timeout even if the
instruction was a RECV instruction.
If a close request is comes from the remote port TCP socket while a connection is established,
the local port must also close the socket. As a technique for checking for the reception of close
requests from the remote TCP socket, user programs should monitor the RCLOSE and CONN
bits in the socket status. (See section 6.3.)
SportNO: Socket identifier (1 to 8)
TermSTS:See tables 4.3 and 4.4.
Detail information: See table 4.5.