Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

kStatus kSocket_Write | ( | kSocket | socket,
|  | const void * | buffer,
|  | kSize | size,
|  | kSize * | written
| ) |  |

Writes one or more bytes.

In blocking mode, this function will block until all bytes are written (or a write timeout occurs).

In non-blocking mode, this function will write zero or more bytes. kSocket_Wait can be used to determine when buffer space is available for a write operation, increasing the odds that bytes can be written successfully.

Parameters

  socket | Socket object.
  buffer | Buffer of bytes to write.
  size | The number of bytes to write.
  written | The number of bytes that were written.

Returns
  Operation status.