EvdConnection

EvdConnection

Synopsis

                    EvdConnection;
                    EvdConnectionClass;
                    EvdConnectionPrivate;
EvdConnection *     evd_connection_new                  (EvdSocket *socket);
void                evd_connection_set_socket           (EvdConnection *self,
                                                         EvdSocket *socket);
EvdSocket *         evd_connection_get_socket           (EvdConnection *self);
EvdTlsSession *     evd_connection_get_tls_session      (EvdConnection *self);
void                evd_connection_starttls_async       (EvdConnection *self,
                                                         EvdTlsMode mode,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            evd_connection_starttls_finish      (EvdConnection *self,
                                                         GAsyncResult *result,
                                                         GError **error);
gboolean            evd_connection_get_tls_active       (EvdConnection *self);
gsize               evd_connection_get_max_readable     (EvdConnection *self);
gsize               evd_connection_get_max_writable     (EvdConnection *self);
gboolean            evd_connection_is_connected         (EvdConnection *self);
gint                evd_connection_get_priority         (EvdConnection *self);
gboolean            evd_connection_set_group            (EvdConnection *self,
                                                         EvdIoStreamGroup *group);
void                evd_connection_lock_close           (EvdConnection *self);
void                evd_connection_unlock_close         (EvdConnection *self);
void                evd_connection_flush_and_shutdown   (EvdConnection *self,
                                                         GCancellable *cancellable);

Object Hierarchy

  GObject
   +----GIOStream
         +----EvdConnection
               +----EvdHttpConnection

Properties

  "group"                    EvdIoStreamGroup*     : Read / Write
  "input-throttle"           EvdStreamThrottle*    : Read
  "output-throttle"          EvdStreamThrottle*    : Read
  "socket"                   EvdSocket*            : Read / Write
  "tls"                      EvdTlsSession*        : Read
  "tls-active"               gboolean              : Read

Signals

  "close"                                          : Run Last / Action
  "group-changed"                                  : Run Last / Action
  "write"                                          : Run Last / Action

Description

Details

EvdConnection

typedef struct _EvdConnection EvdConnection;


EvdConnectionClass

typedef struct {
  GIOStreamClass parent_class;

  /* signal prototypes */
  void (* close)         (EvdConnection *self);
  void (* group_changed) (EvdConnection    *self,
                          EvdIoStreamGroup *new_group,
                          EvdIoStreamGroup *old_group,
                          gpointer          user_data);
  void (* write)         (EvdConnection *self);
} EvdConnectionClass;


EvdConnectionPrivate

typedef struct _EvdConnectionPrivate EvdConnectionPrivate;


evd_connection_new ()

EvdConnection *     evd_connection_new                  (EvdSocket *socket);

socket :

Returns :


evd_connection_set_socket ()

void                evd_connection_set_socket           (EvdConnection *self,
                                                         EvdSocket *socket);

self :

socket :


evd_connection_get_socket ()

EvdSocket *         evd_connection_get_socket           (EvdConnection *self);

self :

Returns :

The EvdSocket object. [transfer none]

evd_connection_get_tls_session ()

EvdTlsSession *     evd_connection_get_tls_session      (EvdConnection *self);

self :

Returns :

The EvdTlsSession object. [transfer none]

evd_connection_starttls_async ()

void                evd_connection_starttls_async       (EvdConnection *self,
                                                         EvdTlsMode mode,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

self :

mode :

cancellable :

callback :

user_data :


evd_connection_starttls_finish ()

gboolean            evd_connection_starttls_finish      (EvdConnection *self,
                                                         GAsyncResult *result,
                                                         GError **error);

self :

result :

error :

Returns :


evd_connection_get_tls_active ()

gboolean            evd_connection_get_tls_active       (EvdConnection *self);

self :

Returns :


evd_connection_get_max_readable ()

gsize               evd_connection_get_max_readable     (EvdConnection *self);

self :

Returns :


evd_connection_get_max_writable ()

gsize               evd_connection_get_max_writable     (EvdConnection *self);

self :

Returns :


evd_connection_is_connected ()

gboolean            evd_connection_is_connected         (EvdConnection *self);

self :

Returns :


evd_connection_get_priority ()

gint                evd_connection_get_priority         (EvdConnection *self);

self :

Returns :


evd_connection_set_group ()

gboolean            evd_connection_set_group            (EvdConnection *self,
                                                         EvdIoStreamGroup *group);

self :

group :

Returns :


evd_connection_lock_close ()

void                evd_connection_lock_close           (EvdConnection *self);

self :


evd_connection_unlock_close ()

void                evd_connection_unlock_close         (EvdConnection *self);

self :


evd_connection_flush_and_shutdown ()

void                evd_connection_flush_and_shutdown   (EvdConnection *self,
                                                         GCancellable *cancellable);

self :

cancellable :

Property Details

The "group" property

  "group"                    EvdIoStreamGroup*     : Read / Write

The group this connection belongs to.


The "input-throttle" property

  "input-throttle"           EvdStreamThrottle*    : Read

The connection's input throttle object.


The "output-throttle" property

  "output-throttle"          EvdStreamThrottle*    : Read

The connection's output throttle object.


The "socket" property

  "socket"                   EvdSocket*            : Read / Write

The socket this HTTP connection will use.


The "tls" property

  "tls"                      EvdTlsSession*        : Read

The underlaying SSL/TLS session object.


The "tls-active" property

  "tls-active"               gboolean              : Read

Returns TRUE if connection has SSL/TLS active, FALSE otherwise. SSL/TLS is activated by calling 'starttls' on a connection.

Default value: FALSE

Signal Details

The "close" signal

void                user_function                      (EvdConnection *evdconnection,
                                                        gpointer       user_data)          : Run Last / Action

evdconnection :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "group-changed" signal

void                user_function                      (EvdConnection *evdconnection,
                                                        GObject       *arg1,
                                                        GObject       *arg2,
                                                        gpointer       user_data)          : Run Last / Action

evdconnection :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "write" signal

void                user_function                      (EvdConnection *evdconnection,
                                                        gpointer       user_data)          : Run Last / Action

evdconnection :

the object which received the signal.

user_data :

user data set when the signal handler was connected.