![Omron CS1W-ETN01 Operation Manuals Download Page 100](http://html1.mh-extra.com/html/omron/cs1w-etn01/cs1w-etn01_operation-manuals_742528100.webp)
6-1
Section
Overview
88
Some port numbers over 1024 may be reserved on some workstations (for ex-
ample, the X-window server is port #6000). Do not use port numbers that are
already reserved for other processes.
The setting status of the UNIX workstation port numbers can be checked in /etc/
services.
6-1-5 Differences between TCP and UDP
There are differences in the socket services between TCP and UDP.
The following procedure is followed each time data is transmitted to ensure that
the data arrives normally at the remote node:
1, 2, 3...
1. The remote node returns ACK when data is received normally.
2. The local node sends the next data after it receives ACK, or it resends the
same data if ACK is not returned within the specified time.
Local node
Transmitted data
ACK (acknowledge)
Resent data
Remote node
Send
request
made.
Receive
request
made.
With the TCP protocol, the remote IP address and remote TCP port number are
specified when an open request is made for a socket. When a send request is
made, the number of bytes to send and the send data are specified. When a re-
ceive request is made, the number of bytes to receive is specified.
With the TCP protocol, communications with another remote device are not pos-
sible until the socket that was opened has been closed.
Data is simply sent to the remote. Unlike TCP, the reception of data is not
checked and data is not resent. To increase communication reliability, data
resends must be programmed by the user in user application.
Local node
Remote node
Transmitted data
ACK (acknowledge: only when
processed by application)
Send
request
made.
Receive
request
made.
With the UDP protocol, the remote IP address and remote TCP port number are
not specified when an open request is made for a socket. When a send request
is made, the remote IP address, the remote TCP port number, the number of
bytes to send, and the send data are specified. When a receive request is made,
the number of bytes to receive is specified (the IP address and UDP port number
from which data was received are provided in the response data).
With the UDP protocol, communications with another remote device are pos-
sible even if the socket that was opened is not closed.
6-1-6 Opening TCP Sockets
To achieve highly reliable data communications, TCP establishes a virtual com-
munications circuit between the two nodes before starting data transmissions.
The virtual communications circuit is known as a “connection.”
TCP Communications
UDP Communications