ClientContext
Object Hierarchy:
Soup.ClientContext
Soup.ClientContext
Soup.ClientContext
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "soup_client_context_get_type ()" ) ] [ Compact ]public class ClientContext
A ClientContext provides additional information about the client making a particular request.
In particular, you can use get_auth_domain and
get_auth_user to determine if HTTP authentication was used
successfully.
get_remote_address and/or
get_host can be used to get information for logging or debugging purposes.
get_gsocket may also be of use in some situations (eg, tracking when
multiple requests are made on the same connection).
Content:
Methods:
public unowned Address ? get_address ()
Retrieves the Address
associated with the remote end of a connection.
public unowned AuthDomain ? get_auth_domain ()
Checks whether the request associated with
this has been authenticated, and if so returns the AuthDomain that
authenticated it.
public unowned string ? get_auth_user ()
Checks whether the request associated with
this has been authenticated, and if so returns the username that the client authenticated as.
public unowned Socket ? get_gsocket ()
Retrieves the Socket that
this is associated with.
public unowned string ? get_host ()
Retrieves the IP address associated with the remote end of a
connection.
public unowned SocketAddress ? get_local_address ()
Retrieves the SocketAddress
associated with the local end of a connection.
public unowned SocketAddress ? get_remote_address ()
Retrieves the SocketAddress
associated with the remote end of a connection.
public unowned Socket get_socket ()
Retrieves the Socket that
this is associated with.
public IOStream steal_connection ()
"Steals" the HTTP connection associated with
this from its Server .