Signal
GioSocketClient::event
since: 2.32
Declaration
void
event (
GSocketClient* self,
GSocketClientEvent event,
GSocketConnectable* connectable,
GIOStream* connection,
gpointer user_data
)
Description [src]
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 beNULL. -
G_SOCKET_CLIENT_RESOLVED:clienthas successfully resolvedconnectablein DNS.connectionwill beNULL. -
G_SOCKET_CLIENT_CONNECTING:clientis about to make a connection to a remote host; either a proxy server or the destination server itself.connectionis theGSocketConnection, which is not yet connected. Since GLib 2.40, you can access the remote address via g_socket_connection_get_remote_address(). -
G_SOCKET_CLIENT_CONNECTED:clienthas successfully connected to a remote host.connectionis the connectedGSocketConnection. -
G_SOCKET_CLIENT_PROXY_NEGOTIATING:clientis about to negotiate with a proxy to get it to connect toconnectable.connectionis theGSocketConnectionto the proxy server. -
G_SOCKET_CLIENT_PROXY_NEGOTIATED:clienthas negotiated a connection toconnectablethrough a proxy server.connectionis the stream returned from g_proxy_connect(), which may or may not be aGSocketConnection. -
G_SOCKET_CLIENT_TLS_HANDSHAKING:clientis about to begin a TLS handshake.connectionis aGTlsClientConnection. -
G_SOCKET_CLIENT_TLS_HANDSHAKED:clienthas successfully completed the TLS handshake.connectionis aGTlsClientConnection. -
G_SOCKET_CLIENT_COMPLETE:clienthas either successfully connected toconnectable(in which caseconnectionis theGSocketConnectionthat it will be returning to the caller) or has failed (in which caseconnectionisNULLand 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 GSocketClient::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 GSocketClientEvent values in
the future; unrecognized event values should be ignored.
| Default handler: The default handler is called after the handlers added via |
| Available since: 2.32 |
Parameters
event-
Type:
GSocketClientEventThe event that is occurring.
connectable-
Type:
GSocketConnectableThe
GSocketConnectablethateventis occurring on.The data is owned by the caller of the function. connection-
Type:
GIOStreamThe current representation of the connection.
The argument can be NULL.The data is owned by the caller of the function.