Name
LINCConnection -- the basic connection object
Synopsis
typedef LINCConnection;
enum LINCConnectionStatus;
gboolean linc_connection_from_fd (LINCConnection *cnx,
int fd,
const LINCProtocolInfo *proto,
char *remote_host_info,
char *remote_serv_info,
gboolean was_initiated,
LINCConnectionStatus status,
LINCConnectionOptions options);
gboolean linc_connection_initiate (LINCConnection *cnx,
const char *proto_name,
const char *remote_host_info,
const char *remote_serv_info,
LINCConnectionOptions options);
int linc_connection_read (LINCConnection *cnx,
guchar *buf,
int len,
gboolean block_for_full_read);
int linc_connection_write (LINCConnection *cnx,
const guchar *buf,
gulong len);
int linc_connection_writev (LINCConnection *cnx,
struct iovec *vecs,
int nvecs,
gulong total_size);
void linc_connection_state_changed (LINCConnection *cnx,
LINCConnectionStatus status);
|
Details
LINCConnection
typedef struct {
GObject parent;
const LINCProtocolInfo *proto;
char *remote_host_info;
char *remote_serv_info;
#ifdef LINC_SSL_SUPPORT
SSL *ssl;
#endif
GIOChannel *gioc;
LincWatch *tag;
int fd;
LINCConnectionStatus status;
LINCConnectionOptions options;
guint8 was_initiated : 1, is_auth : 1;
gpointer priv;
} LINCConnection; |
enum LINCConnectionStatus
typedef enum { LINC_CONNECTING, LINC_CONNECTED, LINC_DISCONNECTED } LINCConnectionStatus; |
linc_connection_from_fd ()
linc_connection_initiate ()
linc_connection_read ()
Warning, block_for_full_read is of limited usefullness.
linc_connection_write ()
Writes a contiguous block of data to the abstract connection.
FIXME: it allows re-enterancy via linc_connection_iterate
in certain cases.
FIXME: on this basis, the connection can die underneath
our feet eg. between the main_iteration and the
g_return_if_fail.
linc_connection_writev ()
This routine writes data to the abstract connection.
FIXME: it allows re-enterancy via linc_connection_iterate
in certain cases.
FIXME: on this basis, the connection can die underneath
our feet.
linc_connection_state_changed ()