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

Reads a 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.

Parameters
socketSocket object.
endPointThe address of the sender.
bufferBuffer to receive the datagram.
sizeThe maximum number of bytes to return.
readThe number of bytes that were read.
Returns
Operation status.