| RoadRunner Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
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); |
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.
| profreg : | a RRProfileRegistry |
| hostname : | a hostname |
| port : | a port |
| error : | location to return an error of type G_IO_ERROR, RR_ERROR or RR_BEEP_ERROR. |
| Returns : | A new (connected) RRTCPConnection instance on success, and NULL on failure. |
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.
| connection : | |
| hostname : | a hostname |
| port : | a port |
| error : | location to return an error of type G_IO_ERROR, RR_ERROR or RR_BEEP_ERROR. |
| Returns : | TRUE on success, FALSE on failure. |
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.
| profreg : | A RRProfileRegistry of profiles this connection supports. |
| Returns : | the new RRTCPConnection. |
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.
| tcpc : | |
| fd : | an open file descriptor |
| role : | a RRRole |
| error : | error: location to return an error of type G_IO_ERROR, RR_ERROR or RR_BEEP_ERROR. |
| Returns : | TRUE on success, FALSE on failure. |
gint rr_tcp_connection_get_fd (RRTCPConnection *tcpc); |
Returns the file-descriptor associated with the socket.
| tcpc : | |
| Returns : | the file-descriptor associated with the socket. |