Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kSocket_ReadFromEx ( kSocket  socket,
kIpEndPoint endPoint,
kSize interfaceIndex,
void *  buffer,
kSize  size,
kSize read 
)

Reads a datagram and provides information about the destination address and the index of the adapter which received the datagram.

In blocking mode, this function will block until a datagram is read (or a read timeout occurs).

In non-blocking mode, kSocket_Wait should be used to determine when this function can be called successfully.

If the underlying platform does not provide the necessary functionality interfaceIndex is set to kSIZE_NULL.

Parameters
socketSocket object.
endPointReceives the destination address of the datagram.
interfaceIndexReceives the index of the interface.
bufferBuffer to receive the datagram.
sizeThe maximum number of bytes to return.
readThe number of bytes that were read.
Returns
Operation status.