Allows communication with QIO without any framing.
More...
Go to the source code of this file.
|
|
void | protocol_raw_init () |
| | Sets up everything to run.
|
| |
|
enum protocol_handles | protocol_raw_handles (struct client *client) |
| | If flash can handle this client.
|
| |
|
enum protocol_status | protocol_raw_handshake (struct client *client) |
| | To complete the single, simple flash handshake.
|
| |
|
enum protocol_status | protocol_raw_route (struct client *client, gsize *used) |
| | Routes the data received from a client.
|
| |
|
void | protocol_raw_heartbeat (struct client *client, const struct protocol_heartbeat *hb) |
| | Sends a heartbeat to a client.
|
| |
| struct protocol_frames | protocol_raw_frame (const gchar *ev_path, const gchar *ev_extra, const evs_cb_t server_cb, const gchar *json) |
| | Frames data to send out to a client. More...
|
| |
| GString * | protocol_raw_format (const gchar *ev_path, const gchar *ev_extra, const evs_cb_t server_cb, const gchar *json) |
| | Formats an event into the QIO protocol. More...
|
| |
|
gboolean | protocol_raw_check_handshake (struct client *client) |
| | Checks that the data received is indeed a valid QIO handshake.
|
| |
|
void | protocol_raw_do_heartbeat (struct client *client, const struct protocol_heartbeat *hb, const gchar *heartbeat, const gsize heartbeat_len) |
| | Checks that the data received is indeed a valid QIO handshake.
|
| |
| enum protocol_status | protocol_raw_handle (struct client *client, gchar *event) |
| | Handles a raw frame from a client. More...
|
| |
Allows communication with QIO without any framing.
In other words, plain text using the QIO protocol.
- Author
- Andrew Stone andre.nosp@m.w@cl.nosp@m.ovar..nosp@m.com
- Copyright
- 2012-2014 Clear Channel Inc.
Extends the reasons for closing a client.
| Enumerator |
|---|
| RAW_INVALID_EVENT_FORMAT |
The event was improperly formatted.
|
| RAW_HEARTATTACK |
Heartbeating the client failed, and he's now dead.
(In other words, client is probably closed because there was no response from him when a heartbeat challenge was sent.)
|
| GString* protocol_raw_format |
( |
const gchar * |
ev_path, |
|
|
const gchar * |
ev_extra, |
|
|
const evs_cb_t |
server_cb, |
|
|
const gchar * |
json |
|
) |
| |
Formats an event into the QIO protocol.
- Parameters
-
| ev_path | Obviously the path |
| ev_extra | Extra path segments |
| server_cb | The callback the server expects |
| json | Data to send |
- Returns
- A buffer containing the formatted event. [transfer-full]
| struct protocol_frames protocol_raw_frame |
( |
const gchar * |
ev_path, |
|
|
const gchar * |
ev_extra, |
|
|
const evs_cb_t |
server_cb, |
|
|
const gchar * |
json |
|
) |
| |
Frames data to send out to a client.
- Returns
- A buffer containing the frame. [transfer-full]
Handles a raw frame from a client.
- Parameters
-
| client | The client that sent the event |
| event | The raw event from the client. MUST be NULL-terminated. |