RRTCPConnection

Name

RRTCPConnection -- 

Synopsis



RRConnection* rr_tcp_connection_new         (RRProfileRegistry *profreg,
                                             const gchar *hostname,
                                             gint port,
                                             GError **error);
gboolean    rr_tcp_connection_connect       (RRTCPConnection *connection,
                                             const gchar *hostname,
                                             gint port,
                                             GError **error);
RRTCPConnection* rr_tcp_connection_new_unconnected
                                            (RRProfileRegistry *profreg);
gboolean    rr_tcp_connection_connect_fd    (RRTCPConnection *tcpc,
                                             gint fd,
                                             RRRole role,
                                             GError **error);
gint        rr_tcp_connection_get_fd        (RRTCPConnection *tcpc);

Object Hierarchy


  GObject
   +----RRConnection
         +----RRTCPConnection

Description

Details

rr_tcp_connection_new ()

RRConnection* rr_tcp_connection_new         (RRProfileRegistry *profreg,
                                             const gchar *hostname,
                                             gint port,
                                             GError **error);

Creates a new RRTCPConnection instance and tries to opens a connection to a beep peer, using the TCP/IP protocol.


rr_tcp_connection_connect ()

gboolean    rr_tcp_connection_connect       (RRTCPConnection *connection,
                                             const gchar *hostname,
                                             gint port,
                                             GError **error);

Opens a connection to a beep peer, using the TCP/IP protocol.


rr_tcp_connection_new_unconnected ()

RRTCPConnection* rr_tcp_connection_new_unconnected
                                            (RRProfileRegistry *profreg);

This function creates a new tcp connection object. Note: the profreg will be g_object unref:ed.


rr_tcp_connection_connect_fd ()

gboolean    rr_tcp_connection_connect_fd    (RRTCPConnection *tcpc,
                                             gint fd,
                                             RRRole role,
                                             GError **error);

Opens a BEEP connection to a beep peer, using an already open socket.


rr_tcp_connection_get_fd ()

gint        rr_tcp_connection_get_fd        (RRTCPConnection *tcpc);

Returns the file-descriptor associated with the socket.