QuickIO  0.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
protocols_rfc6455.h
Go to the documentation of this file.
1 
12 #pragma once
13 #include "quickio.h"
14 
23 
28 
33 
38 };
39 
44 
49 
54 
59 
63 enum protocol_status protocol_rfc6455_route(struct client *client, gsize *used);
64 
69  struct client *client,
70  const struct protocol_heartbeat *hb);
71 
76  const gchar *ev_path,
77  const gchar *ev_extra,
78  const evs_cb_t server_cb,
79  const gchar *json);
80 
84 void protocol_rfc6455_close(struct client *client, guint reason);
85 
94 void protocol_rfc6455_upgrade(struct client *client, const gchar *key);
void protocol_rfc6455_init()
Sets up everything to run.
Client sent data that was not UTF8.
Definition: protocols_rfc6455.h:37
guint64 evs_cb_t
Callbacks are just gigantic integers, 0 meaning "no callback".
Definition: evs.h:23
struct protocol_frames protocol_rfc6455_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.
Useful information about heartbeat timings.
Definition: protocols.h:64
void protocol_rfc6455_upgrade(struct client *client, const gchar *key)
Upgrade a client to RFC6455, sending out all necessary headers.
Client sent an unsupported opcode.
Definition: protocols_rfc6455.h:32
struct protocol * protocol_rfc6455
This protocol's functions.
Definition: protocols_rfc6455.h:43
enum protocol_status protocol_rfc6455_handshake(struct client *client)
To do the rfc6455 handshake.
void protocol_rfc6455_heartbeat(struct client *client, const struct protocol_heartbeat *hb)
Sends a heartbeat to a client.
protocol_handles
If a protocol can handle a client.
Definition: protocols.h:23
enum protocol_handles protocol_rfc6455_handles(struct client *client)
If rfc6455 can handle this client.
void protocol_rfc6455_close(struct client *client, guint reason)
Terminates all communications with the client.
Everything that a client needs to function.
Definition: client.h:100
enum protocol_status protocol_rfc6455_route(struct client *client, gsize *used)
Routes the data received from a client.
What a protocol needs to route messages around.
Definition: protocols.h:114
Every header, definition, and whatnot QuickIO needs to run.
Client didn't ask for upgrade.
Definition: protocols_rfc6455.h:22
protocol_status
Responses from the route() functions.
Definition: protocols.h:43
rfc6455_close_reasons
Extends the reasons for closing a client.
Definition: protocols_rfc6455.h:18
Client didn't mask his message.
Definition: protocols_rfc6455.h:27
Some protocols (HTTP, looking at you) need a few frames types depending on the type of client they're...
Definition: protocols.h:99