Class: Gio::SocketConnection
- Inherits:
-
Object
- Object
- Gio::SocketConnection
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#connect(address, cancellable) ⇒ TrueClass
Connect connection to the specified remote address.
-
#connect_async(address, cancellable, callback, user_data) ⇒ nil
Asynchronously connect connection to the specified remote address.
-
#connect_finish(result) ⇒ TrueClass
Gets the result of a g_socket_connection_connect_async() call.
-
#is_connected ⇒ TrueClass
Checks if connection is connected.
-
#local_address ⇒ Gio::SocketAddress
Try to get the local address of a socket connection.
-
#remote_address ⇒ Gio::SocketAddress
Try to get the remote address of a socket connection.
-
#socket ⇒ Gio::Socket
Socket.
- #socket=(socket) ⇒ Gio::Socket
Instance Method Details
#connect(address, cancellable) ⇒ TrueClass
Connect connection to the specified remote address.
#connect_async(address, cancellable, callback, user_data) ⇒ nil
Asynchronously connect connection to the specified remote address.
This clears the #GSocket:blocking flag on connection’s underlying socket if it is currently set.
Use g_socket_connection_connect_finish() to retrieve the result.
#connect_finish(result) ⇒ TrueClass
Gets the result of a g_socket_connection_connect_async() call.
#is_connected ⇒ TrueClass
Checks if connection is connected. This is equivalent to calling g_socket_is_connected() on connection’s underlying #GSocket.
#local_address ⇒ Gio::SocketAddress
Try to get the local address of a socket connection.
#remote_address ⇒ Gio::SocketAddress
Try to get the remote address of a socket connection.
Since GLib 2.40, when used with g_socket_client_connect() or g_socket_client_connect_async(), during emission of %G_SOCKET_CLIENT_CONNECTING, this function will return the remote address that will be used for the connection. This allows applications to print e.g. “Connecting to example.com (10.42.77.3)…”.
#socket ⇒ Gio::Socket
Returns socket.