Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

kStatus kHttpServerRequest_BeginRead | ( | kHttpServerRequest | request,
|  | k64u * | length,
|  | kStream * | stream
| ) |  |

Begins reading the message body.

For simple messages, call this function once to receive the total message length and a reference to a stream object that can be used to read the entire message.

For chunk-encoded messages, call this function to receive the length of the next chunk and a reference to a stream object that can be used to read the chunk. Each individual chunk must be read out before this function can be used to learn about the next chunk. Reading is complete when a length of zero is reported by this function.

Parameters

  request | Request object.
  length | Receives the amount of data, in bytes, that should be read from the stream.
  stream | Receives a reference to a stream object that should be used to read message content.

Returns
  Operation status.