The data type of Socket is structure _sSOCKET. The specifications are as follows:
Name
Socket
Handle
SrcAdr(*)
PortNo(*)
IpAdr(*)
DstAdr(*)
PortNo(*)
IpAdr(*)
* These members are not used for this instruction.
The following table shows the value of OptionType that you can specify and the data type of Option-
Param that you can select for the specified OptionType. Also, the default operation when this instruction
is not used is given by the default value below.
OptionType
Enumera-
tor
Specifies the
_TCP_NO
TCP_NODELAY option. It
DELAY
can be used only for TCP
socket.
*1 When it is set to TRUE, the Nagle algorithm is disabled. With this setting, even small data is not transmitted
collectively.
NY-series Instructions Reference Manual (W560)
Meaning
Description
Socket
Socket
The handle of the socket
Handle
to clear the receive buf-
fer
Local IP address and
Local address
port number
Port number
Port number
IP address or host
name.
IP address
A DNS or Hosts setting
is required to use a host
name.
Destination
Destination IP address
address
and port number
Port number
Port number
IP address or host
name.
IP address
A DNS or Hosts setting
is required to use a host
name.
Select-
Meaning
able data
type
BOOL
2 Instruction Descriptions
Data type
Valid range
_sSOCKET
---
Depends on
UDINT
data type.
_sSOCK-
ET_AD-
---
DRESS
UINT
1 to 65,535
Depends on
STRING
data type.
_sSOCK-
ET_AD-
---
DRESS
UINT
1 to 65,535
Depends on
STRING
data type.
OptionParam
Meaning of value
*1
TRUE
: TCP_NODELAY option enabled
FALSE: TCP_NODELAY option disabled
Unit
Default
---
---
---
0
---
---
0
2
---
''
---
---
0
---
''
Default
FALSE
2-1087