proxy.http.descriptors module#

⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging.

  1. 2013-present by Abhinav Singh and contributors.


BSD, see LICENSE for more details.

class proxy.http.descriptors.DescriptorsHandlerMixin[source]#

Bases: object

DescriptorsHandlerMixin provides abstraction used by several core HTTP modules include web and proxy plugins. By using DescriptorsHandlerMixin, class becomes complaint with core event loop.

async get_descriptors() Tuple[List[int], List[int]][source]#

Implementations must return a list of descriptions that they wish to read from and write into.

async read_from_descriptors(r: List[int]) bool[source]#

Implementations must now read data over the socket.

async write_to_descriptors(w: List[int]) bool[source]#

Implementations must now write/flush data over the socket.

Note that buffer management is in-build into the connection classes. Hence implementations MUST call flush() here, to send any buffered data over the socket.