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

Contains all of the information needed for quick-event to have a functioning client. More...

#include <qev.h>

Public Attributes

GString * rbuff
 Data waiting to be processed. More...
 
qev_timeout_t_ssl_handshake_timeout
 For SSL: timeout clients that don't complete their handshakes. More...
 
void * _locking_thread
 For the re-entrant part of the lock: holds which thread has the lock.
 
guint _lock
 For acquiring a lock on a client.
 
struct qev_flags _flags
 This client's flags.
 
gchar ip [INET6_ADDRSTRLEN]
 The client's IP. More...
 
SSL * ssl
 For clients. More...
 
SSL_CTX * ssl_ctx
 For server sockets.
 
qev_cb timer_fn
 For timers.
 

Detailed Description

Contains all of the information needed for quick-event to have a functioning client.

This struct may be embedded inside another struct, provided qev can access it. If embedding, be sure to define qev_client and QEV_CLIENT_SLOT so that QEV knows where in your struct to look.

Member Data Documentation

qev_timeout_t* qev_client::_ssl_handshake_timeout

For SSL: timeout clients that don't complete their handshakes.

Todo:
document that servers need to implement their own timeout schemes if they don't want clients backing up into userspace for too long
gchar qev_client::ip[INET6_ADDRSTRLEN]

The client's IP.

Feel free to access this for as long as you have the client.

GString* qev_client::rbuff

Data waiting to be processed.

Attention
You MAY NOT use this except in a qev_on_read() callback. Accessing it anywhere else, at any time, for any reason, is ALWAYS an error. You also MAY NOT replace this buffer with another buffer EVER, for any reason. Pretty much, you're only allowed to use g_string_* functions on this and read/modify its data.
SSL* qev_client::ssl

For clients.

Any calls that have the potential for accessing the network MUST lock the client before accessing this: it's possible for a client to be closed (and lose its socket) while anything is happening within OpenSSL. In reality, this means lock around SSL_read(), SSL_write(), and SSL_accept().


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