| Linc Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> | 
| #define LINC_IS_CONNECTION (obj) enum LINCConnectionStatus; gboolean linc_connection_from_fd (LINCConnection *cnx, int fd, const LINCProtocolInfo *proto, gchar *remote_host_info, gchar *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); glong linc_connection_read (LINCConnection *cnx, guchar *buf, int len, gboolean block_for_full_read); LINCIOStatus linc_connection_write (LINCConnection *cnx, const guchar *buf, gulong len, const LINCWriteOpts *opt_write_opts); LINCIOStatus linc_connection_writev (LINCConnection *cnx, struct iovec *vecs, int nvecs, const LINCWriteOpts *opt_write_opts); void linc_connection_state_changed (LINCConnection *cnx, LINCConnectionStatus status); | 
| #define LINC_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LINC_TYPE_CONNECTION)) | 
| typedef enum { LINC_CONNECTING, LINC_CONNECTED, LINC_DISCONNECTED } LINCConnectionStatus; | 
| gboolean linc_connection_from_fd (LINCConnection *cnx, int fd, const LINCProtocolInfo *proto, gchar *remote_host_info, gchar *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); | 
| glong linc_connection_read (LINCConnection *cnx, guchar *buf, int len, gboolean block_for_full_read); | 
Warning, block_for_full_read is of limited usefullness.
| LINCIOStatus linc_connection_write          (LINCConnection *cnx,
                                             const guchar *buf,
                                             gulong len,
                                             const LINCWriteOpts *opt_write_opts); | 
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.
| LINCIOStatus linc_connection_writev         (LINCConnection *cnx,
                                             struct iovec *vecs,
                                             int nvecs,
                                             const LINCWriteOpts *opt_write_opts); | 
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.
| void        linc_connection_state_changed   (LINCConnection *cnx,
                                             LINCConnectionStatus status); |