Socket Services And Socket Status - Omron CJ1W-ETN11 Operation Manual

Sysmac cs/cj series ethernet units
Hide thumbs Also See for CJ1W-ETN11:
Table of Contents

Advertisement

Using Socket Services with Socket Service Request Switches
15 14
m+9 to m+16
6-2-6

Socket Services and Socket Status

Precautions
A Socket Service Parameter Area cannot be used for other sockets once
open processing has been successfully completed for it. Check the socket
status before attempting to open a socket. TCP socket status is provided in
words m+9 to m+16 in the DM Area for sockets 1 to 8.
TCP Connection Status
The TCP connection status is provided for ports for which TCP sockets have
been opened. When a port is closed, the previous status will remain in the DM
Area until a socket is opened again. Writing data to the DM Area, however, is
not synced with writing to the Socket Status Areas, and timing may vary
somewhat.
13 12 11 10
9
8
Status in indicated in bits 0 to 3 using the 1-digit hexadecimal codes shown in
the following table.
Code
Status
0
CLOSED
1
LISTEN
2
SYN SENT
3
SYN RECEIVED SYN sent and received.
4
ESTABLISHED
5
CLOSE WAIT
6
FIN WAIT1
7
CLOSING
8
LAST ACK
9
FIN WAIT2
A
TIME WAIT
When using socket services, it is important to consider the timing of the status
changes in the Socket Status Area. The diagram below shows a flowchart for
opening UDP.
7
6
5
4
3
2
Connection closed.
Waiting for connection.
Active and waiting for SYN.
Connection established.
FIN received and waiting for close.
Finished and FIN sent.
Finished and FIN exchanged. Waiting for acknowledge-
ment of FIN arrival.
FIN received and finished. Waiting for acknowledgement
of FIN arrival.
FIN arrival acknowledged. Waiting for FIN.
Finished and waiting for silence for twice the maximum
segment life (2MSL).
Section 6-2
1
0
TCP connection status
Meaning
127

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs1w-etn11Cs/cj seriesCs1w-etn01W343-e1-07

Table of Contents