Evd.HttpConnection

g Evd.Connection Evd.Connection Evd.HttpConnection Evd.HttpConnection Evd.Connection->Evd.HttpConnection Evd.IoStream Evd.IoStream Evd.IoStream->Evd.Connection GObject.Object GObject.Object Gio.IOStream Gio.IOStream GObject.Object->Gio.IOStream Gio.IOStream->Evd.IoStream

Subclasses:

None

Methods

Inherited:

Evd.Connection (15), Evd.IoStream (4), Gio.IOStream (11), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (socket)

get_current_request ()

get_keepalive ()

read_all_content (cancellable, callback, *user_data)

read_all_content_finish (result)

read_content (buffer, size, cancellable, callback, *user_data)

read_content_finish (result)

read_request_headers (cancellable, callback, *user_data)

read_request_headers_finish (result)

read_response_headers (cancellable, callback, *user_data)

read_response_headers_finish (result)

redirect (url, permanently)

respond (ver, status_code, reason_phrase, headers, content, size, close_after)

respond_simple (status_code, content, size)

set_current_request (request)

set_keepalive (keepalive)

unread_request_headers (request)

write_content (buffer, size, more)

write_request_headers (request, cancellable, callback, *user_data)

write_request_headers_finish (result)

write_response_headers (version, status_code, reason_phrase, headers)

Virtual Methods

Inherited:

Evd.Connection (2), Evd.IoStream (3), Gio.IOStream (5), GObject.Object (7)

Properties

Inherited:

Evd.Connection (3), Evd.IoStream (3), Gio.IOStream (3)

Signals

Inherited:

Evd.Connection (1), Evd.IoStream (2), GObject.Object (1)

Fields

Inherited:

Evd.Connection (1), Evd.IoStream (2), GObject.Object (1)

Name

Type

Access

Description

parent

Evd.Connection

r

Class Details

class Evd.HttpConnection(**kwargs)
Bases:

Evd.Connection

Abstract:

No

Structure:

Evd.HttpConnectionClass

classmethod new(socket)
Parameters:

socket (Evd.Socket) –

Return type:

Evd.HttpConnection

get_current_request()
Return type:

Evd.HttpRequest

get_keepalive()
Return type:

bool

read_all_content(cancellable, callback, *user_data)
Parameters:
read_all_content_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

(str, size: int)

read_content(buffer, size, cancellable, callback, *user_data)
Parameters:
read_content_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

(int, more: bool)

read_request_headers(cancellable, callback, *user_data)
Parameters:
read_request_headers_finish(result)
Parameters:

result (Gio.AsyncResult) – The Gio.AsyncResult object passed to the callback.

Raises:

GLib.Error

Return type:

Evd.HttpRequest

read_response_headers(cancellable, callback, *user_data)
Parameters:
read_response_headers_finish(result)
Parameters:

result (Gio.AsyncResult) – The Gio.AsyncResult object passed to the callback.

Raises:

GLib.Error

Return type:

(Soup.MessageHeaders, version: Soup.HTTPVersion, status_code: int, reason_phrase: str)

redirect(url, permanently)
Parameters:
  • url (str) –

  • permanently (bool) –

Raises:

GLib.Error

Return type:

bool

respond(ver, status_code, reason_phrase, headers, content, size, close_after)
Parameters:
Raises:

GLib.Error

Return type:

bool

respond_simple(status_code, content, size)
Parameters:
Return type:

bool

set_current_request(request)
Parameters:

request (Evd.HttpRequest or None) –

set_keepalive(keepalive)
Parameters:

keepalive (bool) – True or False

Manually sets the keepalive flag, overriding the internal state obtained from HTTP headers.

unread_request_headers(request)
Parameters:

request (Evd.HttpRequest) –

Raises:

GLib.Error

Return type:

bool

write_content(buffer, size, more)
Parameters:
Raises:

GLib.Error

Return type:

bool

write_request_headers(request, cancellable, callback, *user_data)
Parameters:
write_request_headers_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

write_response_headers(version, status_code, reason_phrase, headers)
Parameters:
Raises:

GLib.Error

Return type:

bool