Buffers inbound payloads and hands complete messages over.
More...
#include <endpoint.h>
|
| struct pbl_pp_receiver *(* | prepare )(struct pbl_pp_session *session, const struct pbl_pp_endpoint *endpoint, size_t length) |
| | Prepare a context for a new message.
|
| |
| void(* | write )(struct pbl_pp_receiver *receiver, const uint8_t *data, size_t length) |
| | Buffer payload data of the current message.
|
| |
| void(* | finish )(struct pbl_pp_receiver *receiver) |
| | Hand the complete message over and release the context.
|
| |
| void(* | cleanup )(struct pbl_pp_receiver *receiver) |
| | Drop the current message because the session closed, and release the context.
|
| |
Buffers inbound payloads and hands complete messages over.
Callbacks run in the context of the transport that received the data. Several sessions may be receiving messages at once. All callbacks are mandatory.
◆ cleanup
| void(* pbl_pp_receiver_api::cleanup) (struct pbl_pp_receiver *receiver) |
Drop the current message because the session closed, and release the context.
- Parameters
-
| receiver | Receiver context. |
◆ finish
| void(* pbl_pp_receiver_api::finish) (struct pbl_pp_receiver *receiver) |
Hand the complete message over and release the context.
- Parameters
-
| receiver | Receiver context. |
◆ prepare
| struct pbl_pp_receiver *(* pbl_pp_receiver_api::prepare) (struct pbl_pp_session *session, const struct pbl_pp_endpoint *endpoint, size_t length) |
Prepare a context for a new message.
- Parameters
-
| session | Session receiving the message. |
| endpoint | Destination endpoint. |
| length | Payload length in bytes. |
- Returns
- Receiver context, or NULL to drop the message.
◆ write
| void(* pbl_pp_receiver_api::write) (struct pbl_pp_receiver *receiver, const uint8_t *data, size_t length) |
Buffer payload data of the current message.
- Parameters
-
| receiver | Receiver context. |
| data | Payload data. |
| length | Length of data in bytes. |
The documentation for this struct was generated from the following file: