ClientContext

A #SoupClientContext provides additional information about the client making a particular request. In particular, you can use soup_client_context_get_auth_domain() and soup_client_context_get_auth_user() to determine if HTTP authentication was used successfully.

soup_client_context_get_remote_address() and/or soup_client_context_get_host() can be used to get information for logging or debugging purposes. soup_client_context_get_gsocket() may also be of use in some situations (eg, tracking when multiple requests are made on the same connection).

Constructors

this
this(SoupClientContext* soupClientContext, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

getAddress
Address getAddress()

Retrieves the #SoupAddress associated with the remote end of a connection.

getAuthDomain
AuthDomain getAuthDomain()

Checks whether the request associated with @client has been authenticated, and if so returns the #SoupAuthDomain that authenticated it.

getAuthUser
string getAuthUser()

Checks whether the request associated with @client has been authenticated, and if so returns the username that the client authenticated as.

getClientContextStruct
SoupClientContext* getClientContextStruct(bool transferOwnership)

Get the main Gtk struct

getGsocket
GIOSocket getGsocket()

Retrieves the #GSocket that @client is associated with.

getHost
string getHost()

Retrieves the IP address associated with the remote end of a connection.

getLocalAddress
SocketAddress getLocalAddress()

Retrieves the #GSocketAddress associated with the local end of a connection.

getRemoteAddress
SocketAddress getRemoteAddress()

Retrieves the #GSocketAddress associated with the remote end of a connection.

getSocket
Socket getSocket()

Retrieves the #SoupSocket that @client is associated with.

getStruct
void* getStruct()

the main Gtk struct as a void*

stealConnection
IOStream stealConnection()

"Steals" the HTTP connection associated with @client from its #SoupServer. This happens immediately, regardless of the current state of the connection; if the response to the current #SoupMessage has not yet finished being sent, then it will be discarded; you can steal the connection from a #SoupMessage:wrote-informational or #SoupMessage:wrote-body signal handler if you need to wait for part or all of the response to be sent.

Static functions

getType
GType getType()

Variables

ownedRef
bool ownedRef;
Undocumented in source.
soupClientContext
SoupClientContext* soupClientContext;

the main Gtk struct

Meta