Functions
g_socket_connection_connect ()
gboolean
g_socket_connection_connect (GSocketConnection *connection,
GSocketAddress *address,
GCancellable *cancellable,
GError **error);
Connect connection
to the specified remote address.
Returns
TRUE if the connection succeeded, FALSE on error
Since: 2.32
g_socket_connection_is_connected ()
gboolean
g_socket_connection_is_connected (GSocketConnection *connection);
Checks if connection
is connected. This is equivalent to calling
g_socket_is_connected() on connection
's underlying GSocket.
Returns
whether connection
is connected
Since: 2.32
g_socket_connection_get_local_address ()
GSocketAddress *
g_socket_connection_get_local_address (GSocketConnection *connection,
GError **error);
Try to get the local address of a socket connection.
Returns
a GSocketAddress or NULL on error.
Free the returned object with g_object_unref().
[transfer full]
Since: 2.22
g_socket_connection_get_socket ()
GSocket *
g_socket_connection_get_socket (GSocketConnection *connection);
Gets the underlying GSocket object of the connection.
This can be useful if you want to do something unusual on it
not supported by the GSocketConnection APIs.
Returns
a GSocket or NULL on error.
[transfer none]
Since: 2.22
g_socket_connection_factory_lookup_type ()
GType
g_socket_connection_factory_lookup_type
(GSocketFamily family,
GSocketType type,
gint protocol_id);
Looks up the GType to be used when creating socket connections on
sockets with the specified family
, type
and protocol_id
.
If no type is registered, the GSocketConnection base type is returned.
Since: 2.22
g_socket_connection_factory_register_type ()
void
g_socket_connection_factory_register_type
(GType g_type,
GSocketFamily family,
GSocketType type,
gint protocol);
Looks up the GType to be used when creating socket connections on
sockets with the specified family
, type
and protocol
.
If no type is registered, the GSocketConnection base type is returned.
Since: 2.22