Zen API

- Home
- Topics
- Types
- Files

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

  socket | Socket object.
  endPoint | Receives the destination address of the datagram.
  interfaceIndex | Receives the index of the interface.
  buffer | Buffer to receive the datagram.
  size | The maximum number of bytes to return.
  read | The number of bytes that were read.

Returns
  Operation status.