Omron CJ1W-ETN11 Network Card User Manual


 
116
Using Socket Services with Socket Service Request Switches Section 6-2
Local UDP/TCP Port No.
Specify the number of the UDP or TCP port for the socket to use for communi-
cations.
Do not specify the port being used as the FINS UDP port (default: 9600)
in an open request for a UDP socket.
Do not specify FTP server TCP port numbers 20 and 21 in an open
request for a TCP port.
Do not specify mail communications TCP port number 25.
As a rule, use port numbers 1,024 and higher.
If port number 0 is specified when for an active TCP open, the TCP port num-
ber will be automatically allocated and the number of the port that was
opened will be stored in the local UDP/TCP port number in the Socket Service
Parameter Area (i.e., the actual port number will be overwritten on the value of
0 set by the user).
Remote IP Address
Specify the IP address of the remote device.
Offset +2 in the Socket Service Parameter Area contains the upper bytes
of the Remote IP Address, and offset +3 contains the lower bytes.
Example: The contents of offsets +2 and +3 would be as shown below
when
the Remote IP Address is 196.36.32.55 (C4.24.20.37 Hex).
+2: C424
+3: 2037
This parameter is not used when making a receive request for a UDP
socket. The remote IP address will be stored with the response data and
will be written as the Remote IP Address in the Socket Service Parameter
Area.
• When opening a passive TCP socket, the combination of the remote IP
address and the remote TCP port number can be used to affect process-
ing as shown in the following table.
If the Remote IP Address is set to 0, a connection can be made to any remote
node and the remote IP address of the node that is connected will be stored
as the Remote IP Address in the Socket Service Parameter Area. If a specific
remote I/O address is set, then a connection can be made only to the node
with the specified address.
If the Remote TCP Port No. is set to 0, a connection can be made to any
remote node regardless of the TCP port number it is using. If a specific
remote TCP port number is set, then a connection can be made only to a
node using the specified TCP port number.
Remote IP
Address
Remote TCP
Port No.
Processing
0 0 All connection requests accepted.
0 Not 0 Connection requests accepted only for the same
port number.
Not 0 0 Connection requests accepted only for the same IP
address.
Not 0 Not 0 Connection requests accepted only for the same
port number and IP address.