proxy.core.connection.connection module#
proxy.py#
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging.
- copyright
2013-present by Abhinav Singh and contributors.
- license
BSD, see LICENSE for more details.
- class proxy.core.connection.connection.TcpConnection(tag: int)[source]#
Bases:
abc.ABC
TCP server/client connection abstraction.
Main motivation of this class is to provide a buffer management when reading and writing into the socket.
Implement the connection property abstract method to return a socket connection object.
- _abc_impl = <_abc._abc_data object>#
- buffer: List[memoryview]#
- abstract property connection: Union[ssl.SSLSocket, socket.socket]#
Must return the socket connection to use in this class.
- flush(max_send_size: Optional[int] = None) int [source]#
Users must handle BrokenPipeError exceptions
- queue(mv: memoryview) None [source]#
- recv(buffer_size: int = 131072) Optional[memoryview] [source]#
Users must handle socket.error exceptions
- send(data: Union[memoryview, bytes]) int [source]#
Users must handle BrokenPipeError exceptions