QuickIO  0.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Enumerations | Functions | Variables
protocols_rfc6455.h File Reference

The QuickIO protocol over websockets (rfc6455). More...

#include "quickio.h"

Go to the source code of this file.

Enumerations

enum  rfc6455_close_reasons { RFC6455_MISSING_UPGRADE = 3000, RFC6455_NO_MASK, RFC6455_UNSUPPORTED_OPCODE, RFC6455_NOT_UTF8 }
 Extends the reasons for closing a client. More...
 

Functions

void protocol_rfc6455_init ()
 Sets up everything to run.
 
enum protocol_handles protocol_rfc6455_handles (struct client *client)
 If rfc6455 can handle this client.
 
enum protocol_status protocol_rfc6455_handshake (struct client *client)
 To do the rfc6455 handshake.
 
enum protocol_status protocol_rfc6455_route (struct client *client, gsize *used)
 Routes the data received from a client.
 
void protocol_rfc6455_heartbeat (struct client *client, const struct protocol_heartbeat *hb)
 Sends a heartbeat to a client.
 
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.
 
void protocol_rfc6455_close (struct client *client, guint reason)
 Terminates all communications with the client.
 
void protocol_rfc6455_upgrade (struct client *client, const gchar *key)
 Upgrade a client to RFC6455, sending out all necessary headers. More...
 

Variables

struct protocolprotocol_rfc6455
 This protocol's functions.
 

Detailed Description

The QuickIO protocol over websockets (rfc6455).

Author
Andrew Stone andre.nosp@m.w@cl.nosp@m.ovar..nosp@m.com

Enumeration Type Documentation

Extends the reasons for closing a client.

Enumerator
RFC6455_MISSING_UPGRADE 

Client didn't ask for upgrade.

RFC6455_NO_MASK 

Client didn't mask his message.

RFC6455_UNSUPPORTED_OPCODE 

Client sent an unsupported opcode.

RFC6455_NOT_UTF8 

Client sent data that was not UTF8.

Function Documentation

void protocol_rfc6455_upgrade ( struct client client,
const gchar *  key 
)

Upgrade a client to RFC6455, sending out all necessary headers.

Parameters
clientThe client to upgrade
keySec-WebSocket-Key from the HTTP Headers