event
Description:
public virtual signal void event (SocketClientEvent event, SocketConnectable connectable, IOStream? connection)
Emitted when client's activity on connectable changes state.
Among other things, this can be used to provide progress information about a network connection in the UI. The meanings of the different
event values are as follows:
- g_socket_client_resolving:
clientis about to look upconnectablein DNS.connectionwill be null. - g_socket_client_resolved:
clienthas successfully resolvedconnectablein DNS.connectionwill be null. - g_socket_client_connecting:
clientis about to make a connection to a remote host; either a proxy server or the destination server itself.connectionis the SocketConnection, which is not yet connected. Since GLib 2.40, you can access the remote address via get_remote_address. - g_socket_client_connected:
clienthas successfully connected to a remote host.connectionis the connected SocketConnection. - g_socket_client_proxy_negotiating:
clientis about to negotiate with a proxy to get it to connect toconnectable.connectionis the SocketConnection to the proxy server. - g_socket_client_proxy_negotiated:
clienthas negotiated a connection toconnectablethrough a proxy server.connectionis the stream returned from connect, which may or may not be a SocketConnection. - g_socket_client_tls_handshaking:
clientis about to begin a TLS handshake.connectionis a TlsClientConnection. - g_socket_client_tls_handshaked:
clienthas successfully completed the TLS handshake.connectionis a TlsClientConnection. - g_socket_client_complete:
clienthas either successfully connected toconnectable(in which caseconnectionis the SocketConnection that it will be returning to the caller) or has failed (in which caseconnectionis null and the client is about to return an error).
Each event except g_socket_client_complete may be emitted multiple times (or not at all) for a given
connectable (in particular, if client ends up attempting to connect to more than one address). However, if client
emits the event signal at all for a given connectable, then it will always emit it with
g_socket_client_complete when it is done.
Note that there may be additional SocketClientEvent values in the future;
unrecognized event values should be ignored.
Parameters:
| event |
the event that is occurring |
| connectable |
the SocketConnectable that |
| connection |
the current representation of the connection |