Anybus CompactCom 40 Network Manual page 126

Compactcom 40 ethernet/ip series
Hide thumbs Also See for CompactCom 40:
Table of Contents

Advertisement

Anybus Module Objects
Command Details: Shutdown
Category
Extended
Details
Command Code
Valid for:
Description
This command closes a TCP-connection using the FIN-flag. Note that the response does not indicate if the
connection actually shut down, which means that this command cannot be used to poll non-blocking sockets,
nor will it block for blocking sockets.
Command Details
Field
Contents
CmdExt[0]
(reserved, set to zero)
CmdExt[1]
Value:
00h
01h
02h
Response Details
(no data)
The recommended sequence to gracefully shut down a TCP connection is described below.
Application initiates shutdown:
1.
Send shutdown with CmdExt[1] set to 01h. This will send FIN-flag to host shutting down the send chan-
nel, note that the receive channel will still be operational.
2.
Receive data on socket until error message Object specific error (EPIPE (13)) is received, indicating that
the host closed the receive channel. If host does not close the receive channel use a timeout and prog-
ress to step 3.
3.
Delete the socket instance. If step 2 timed out, RST-flag will be sent to terminate the socket.
Host initiates shutdown:
1.
Receive data on socket, if zero bytes received it indicates that the host closed the receive channel of the
socket.
2.
Try to send any unsent data to the host.
3.
Send shutdown with CmdExt[1] set to 01h. This will send FIN-flag to host shutting down the send
channel.
4.
Delete the socket instance.
Anybus CompactCom 40 EtherNet/IP Network Guide
11h
Instance
Mode:
Shutdown receive channel
Shutdown send channel
Shutdown both receive- and send channel
124 (218)
SCM-1202-031 -EN 1.6

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CompactCom 40 and is the answer not in the manual?

Questions and answers

Table of Contents