QuickIO  0.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Attributes | List of all members
client Struct Reference

Everything that a client needs to function. More...

#include <client.h>

Public Attributes

struct qev_client qev_client
 All for quick-event.
 
struct {
   gboolean   handshaked:1
 If the client has handshaked with its protocol.
 
   struct protocol *   prot
 Once a protocol has accepted the client, this will point to the protocol-level functions that can be used.
 
   union {
   }   flags
 Any protocol-level flags should be created here as a union of bit-field structs.
 
protocol
 What's needed to handle protocol support in the client.
 
gint64 last_send
 When anything was last sent to the client.
 
gint64 last_recv
 When anything was last received from the client.
 
qev_timeout_ttimeout
 The only timeout that will be set on a client from QIO. More...
 
GHashTable * subs
 Maps: struct subscription -> gint32 (qev_list index)
 
GHashTable * data
 Any extra data that can be attached to a client using client_{get,set,del,has}().
 
struct {
   __uint128_t   sid
 The key in http's client table.
 
   guint   tbl
 Which table the client lives in.
 
   guint64   body_len
 How much data is left to read from the socket.
 
   struct {
      gboolean   is_post:1
 If the client sent a POST.
 
      gboolean   iframe_requested:1
 If the client requested the iframe.
 
      gboolean   keep_alive:1
 If the client is keep-alive.
 
      gboolean   in_request:1
 If headers have been received and the client currently processing a request.
 
      gboolean   incoming:1
 A new request just came in and is being processed; don't send out any updates until the new request's entire body has been processed. More...
 
   }   flags
 If you can't figure out what this is, you should put the magic box down.
 
   struct client *   client
 Can be 1 of 3 things, depending on client type: 1) If the client is a surrogate, then points to the client with an open socket that is waiting on data for the surrogate 2) If the client has a socket, then points to the surrogate client 3) Just a NULL. More...
 
http
 For managing the HTTP session for the client.
 
struct client_cbcbs [4]
 The callbacks for the client.
 
guint16 cbs_id
 The ID of the most recent callback.
 

Detailed Description

Everything that a client needs to function.

Member Data Documentation

struct client* client::client

Can be 1 of 3 things, depending on client type: 1) If the client is a surrogate, then points to the client with an open socket that is waiting on data for the surrogate 2) If the client has a socket, then points to the surrogate client 3) Just a NULL.

Must be free'd with qev_unref().

gboolean client::incoming

A new request just came in and is being processed; don't send out any updates until the new request's entire body has been processed.

This is for surrogates.

qev_timeout_t* client::timeout

The only timeout that will be set on a client from QIO.

Attention
This MAY ONLY ever be set on connect and in the protocols. It may never be altered anywhere else.

The documentation for this struct was generated from the following file: