Go to the source code of this file.
Data Structures | |
struct | lwes_listener |
Listens for LWES events. More... | |
Functions | |
lwes_listener * | lwes_listener_create (LWES_SHORT_STRING address, LWES_SHORT_STRING iface, LWES_U_INT_32 port) |
Create a Listener. | |
int | lwes_listener_add_header_fields (struct lwes_listener *listener, LWES_BYTE_P bytes, size_t max, size_t *len) |
Copy some date from the UDP packet into the event. | |
int | lwes_listener_event_has_name (LWES_BYTE_P bytes, size_t len, LWES_CONST_SHORT_STRING name) |
Determine if a serialized event is of a given type. | |
int | lwes_listener_recv_process_event (struct lwes_listener *listener, struct lwes_event *event, int len) |
This adds headers and deserializes the event. | |
int | lwes_listener_recv (struct lwes_listener *listener, struct lwes_event *event) |
Receive an event from the listener in a blocking manner. | |
int | lwes_listener_recv_by (struct lwes_listener *listener, struct lwes_event *event, unsigned int timeout_ms) |
Receive an event from the listener with a timeout. | |
int | lwes_listener_recv_bytes (struct lwes_listener *listener, LWES_BYTE_P bytes, size_t max) |
Receive bytes from the listener in a blocking manner. | |
int | lwes_listener_recv_bytes_by (struct lwes_listener *listener, LWES_BYTE_P bytes, size_t max, unsigned int timeout_ms) |
Receive bytes from the listener with a timeout. | |
int | lwes_listener_destroy (struct lwes_listener *listener) |
Destroy a Listener. |
|
Create a Listener.
|
|
Copy some date from the UDP packet into the event. This will add the following fields to the event as additional attributes
This should be called immediately after one of
|
|
Determine if a serialized event is of a given type. This function will compare the name in a serialized event against a given name, if they match 0 is returned, if not a non-zero value is returned
|
|
This adds headers and deserializes the event. This is actually a private function, which will be removed next major version bump of lwes.
|
|
Receive an event from the listener in a blocking manner.
|
|
Receive an event from the listener with a timeout.
|
|
Receive bytes from the listener in a blocking manner. This returns the raw bytes and returns them, it will not add header fields nor deserialize the event. This is useful if you want to journal without the cost of deserialization.
|
|
Receive bytes from the listener with a timeout. This returns the raw bytes and returns them, it will not add header fields nor deserialize the event. This is useful if you want to journal without the cost of deserialization.
|
|
Destroy a Listener.
|