ServerMessage
An HTTP server request and response pair.
A SoupServerMessage represents an HTTP message that is being sent or received on a class@Server.
class@Server will create SoupServerMessage
s automatically for incoming requests, which your application will receive via handlers.
Note that libsoup's terminology here does not quite match the HTTP specification: in RFC 2616, an "HTTP-message" is either a Request, or a Response. In libsoup, a #SoupServerMessage combines both the request and the response.
Skipped during bindings generation
parameter
resp_body
: Array parameter of type guint8 is not supported
Constructors
Properties
Functions
Emits the "connected" signal. See onConnected.
Emits the "disconnected" signal. See onDisconnected.
Emits the "finished" signal. See onFinished.
Emits the "got-body" signal. See onGotBody.
Emits the "got-chunk" signal. See onGotChunk.
Emits the "got-headers" signal. See onGotHeaders.
Emits the "wrote-body" signal. See onWroteBody.
Emits the "wrote-body-data" signal. See onWroteBodyData.
Emits the "wrote-chunk" signal. See onWroteChunk.
Emits the "wrote-headers" signal. See onWroteHeaders.
Emits the "wrote-informational" signal. See onWroteInformational.
Get the HTTP version of @msg.
Retrieves the class@Gio.SocketAddress associated with the local end of a connection.
Get the HTTP reason phrase of @msg.
Retrieves the class@Gio.SocketAddress associated with the remote end of a connection.
Retrieves the IP address associated with the remote end of a connection.
Get the request body of @msg.
Get the request headers of @msg.
Get the response body of @msg.
Get the response headers of @msg.
Gets if @msg represents an OPTIONS message with the path *
.
Emitted during the @msg's connection TLS handshake after client TLS certificate has been received. You can return true to accept @tls_certificate despite
Emitted when the @msg's socket is connected and the TLS handshake completed.
Emitted when the @msg's socket is disconnected.
Emitted when all HTTP processing is finished for a message. (After signal@ServerMessage::wrote-body).
Emitted after receiving a chunk of a message body.
Emitted after receiving the Request-Line and request headers.
Emitted immediately after writing the complete response body for a message.
Emitted immediately after writing a portion of the message body to the network.
Emitted immediately after writing a body chunk for a message.
Emitted immediately after writing the response headers for a message.
Emitted immediately after writing a 1xx (Informational) response.
Set the HTTP version of @msg.
Sets @msg's status_code to @status_code and adds a Location header pointing to @redirect_uri. Use this from a class@Server when you want to redirect the client to another URI.
"Steals" the HTTP connection associated with @msg from its #SoupServer. This happens immediately, regardless of the current state of the connection; if the response to @msg has not yet finished being sent, then it will be discarded; you can steal the connection from a signal@ServerMessage::wrote-informational or signal@ServerMessage::wrote-body signal handler if you need to wait for part or all of the response to be sent.