117
Doc.Id. HMSI-27-212
Anybus CompactCom 40 EtherNet/IP
Doc.Rev. 1.5
Command Details: Connect
Category
Extended
Details
Command Code.:
14h
Valid for:
Instance
Description
For SOCK_DGRAM-sockets, this command specifies the peer with which the socket is to be associated
(to which datagrams are sent and the only address from which datagrams are received).
For SOCK_STREAM-sockets, this command attempts to establish a connection to a host.
SOCK_STREAM-sockets may connect successfully only once, while SOCK_DGRAM-sockets may use
this service multiple times to change their association. SOCK_DGRAM-sockets may dissolve their as-
sociation by connecting to IP address 0.0.0.0, port 0 (zero).
NON-BLOCKING mode:
This command must be issued repeatedly (polled) until a connection is connected, rejected or
timed out. The first connect-attempt will be accepted, thereafter the command will return error
code 22 (EINPROGRESS) on poll requests while attempting to connect.
BLOCKING mode:
This command will block until a connection has been established or the connection request is
cancelled due to a timeout or a connection error.
• Command Details
• Response Details
(no data)
Field
Contents
Contents
CmdExt[0] (reserved)
(set to zero)
CmdExt[1]
Data[0]
Host IP address byte 3 (low)
-
Data[1]
Host IP address byte 2
Data[2]
Host IP address byte 1
Data[3]
Host IP address byte 0 (high)
Data[4]
Host port number (low)
Data[5]
Host port number (high)