![Anybus CompactCom 40 Common Ethernet Design Manual Download Page 75](http://html1.mh-extra.com/html/anybus/compactcom-40-common-ethernet/compactcom-40-common-ethernet_design-manual_2948756075.webp)
73 (104)
Command Details: Receive
Category
Extended
Details
Command Code
15h
Valid for:
Instance
Description
This command receives data from a connected socket. Message segmentation may be used to receive up to
1472 bytes (for more information, see
).
For SOCK-DGRAM-sockets, the module will return the requested amount of data from the next received da-
tagram. If the datagram is smaller than requested, the entire datagram will be returned in the response mes-
sage. If the datagram is larger than requested, the excess bytes will be discarded.
For SOCK_STREAM-sockets, the module will return the requested number of bytes from the received data
stream. If the actual data size is less than requested, all available data will be returned.
NON-BLOCKING mode:
If no data is available on the socket, the error code 0006h (EWOULDBLOCK) will be returned.
BLOCKING mode:
The module will not issue a response until the operation has finished.
If the module responds successfully with 0 (zero) bytes of data, it means that the host has closed the connec-
tion. The send channel may however still be valid and must be closed using
Shutdown
and/or
Delete
.
•
Command Details
Field
Contents
Comments
CmdExt[0]
(reserved)
(set to zero)
CmdExt[1]
Segmentation Control bits
For more information, see
Data[0]
Receive data size (low)
Only used in the first segment
Data[1]
Receive data size (high)
•
Response Details
The data in the response may be segmented (For more information, see
).
Field
Contents
Comments
CmdExt[0]
(reserved)
(set to zero)
CmdExt[1]
Segmentation Control bits
For more information, see
Data[0...n]
Received data
-
Anybus
®
CompactCom
™
40 Common Ethernet Design Guide
HMSI-27–269 2.1