Public Member Functions | Private Member Functions | Private Attributes | List of all members
tests.unit._tcp_proxy.TcpProxy Class Reference
Inheritance diagram for tests.unit._tcp_proxy.TcpProxy:
Inheritance graph
[legend]

Public Member Functions

def __enter__ (self)
 
def __exit__ (self, exc_type, exc_val, exc_tb)
 
def __init__ (self, bind_address, gateway_address, gateway_port)
 
def get_byte_count (self)
 
def get_port (self)
 
def reset_byte_count (self)
 
def start (self)
 
def stop (self)
 

Private Member Functions

def _handle_reads (self, sockets_to_read)
 
def _handle_writes (self, sockets_to_write)
 
def _run_proxy (self)
 

Private Attributes

 _bind_address
 
 _byte_count
 
 _byte_count_lock
 
 _client_sockets
 
 _gateway_address
 
 _gateway_port
 
 _listen_socket
 
 _northbound_data
 
 _port
 
 _proxy_socket
 
 _received_byte_count
 
 _sent_byte_count
 
 _southbound_data
 
 _stop_event
 
 _thread
 

Detailed Description

Proxies a TCP connection between one client and one server.

Definition at line 41 of file _tcp_proxy.py.

Constructor & Destructor Documentation

◆ __init__()

def tests.unit._tcp_proxy.TcpProxy.__init__ (   self,
  bind_address,
  gateway_address,
  gateway_port 
)

Definition at line 44 of file _tcp_proxy.py.

Member Function Documentation

◆ __enter__()

def tests.unit._tcp_proxy.TcpProxy.__enter__ (   self)

Definition at line 136 of file _tcp_proxy.py.

◆ __exit__()

def tests.unit._tcp_proxy.TcpProxy.__exit__ (   self,
  exc_type,
  exc_val,
  exc_tb 
)

Definition at line 140 of file _tcp_proxy.py.

◆ _handle_reads()

def tests.unit._tcp_proxy.TcpProxy._handle_reads (   self,
  sockets_to_read 
)
private

Definition at line 76 of file _tcp_proxy.py.

◆ _handle_writes()

def tests.unit._tcp_proxy.TcpProxy._handle_writes (   self,
  sockets_to_write 
)
private

Definition at line 97 of file _tcp_proxy.py.

◆ _run_proxy()

def tests.unit._tcp_proxy.TcpProxy._run_proxy (   self)
private

Definition at line 108 of file _tcp_proxy.py.

◆ get_byte_count()

def tests.unit._tcp_proxy.TcpProxy.get_byte_count (   self)

Definition at line 127 of file _tcp_proxy.py.

◆ get_port()

def tests.unit._tcp_proxy.TcpProxy.get_port (   self)

Definition at line 73 of file _tcp_proxy.py.

◆ reset_byte_count()

def tests.unit._tcp_proxy.TcpProxy.reset_byte_count (   self)

Definition at line 131 of file _tcp_proxy.py.

◆ start()

def tests.unit._tcp_proxy.TcpProxy.start (   self)

Definition at line 66 of file _tcp_proxy.py.

◆ stop()

def tests.unit._tcp_proxy.TcpProxy.stop (   self)

Definition at line 121 of file _tcp_proxy.py.

Member Data Documentation

◆ _bind_address

tests.unit._tcp_proxy.TcpProxy._bind_address
private

Definition at line 45 of file _tcp_proxy.py.

◆ _byte_count

tests.unit._tcp_proxy.TcpProxy._byte_count
private

Definition at line 133 of file _tcp_proxy.py.

◆ _byte_count_lock

tests.unit._tcp_proxy.TcpProxy._byte_count_lock
private

Definition at line 49 of file _tcp_proxy.py.

◆ _client_sockets

tests.unit._tcp_proxy.TcpProxy._client_sockets
private

Definition at line 62 of file _tcp_proxy.py.

◆ _gateway_address

tests.unit._tcp_proxy.TcpProxy._gateway_address
private

Definition at line 46 of file _tcp_proxy.py.

◆ _gateway_port

tests.unit._tcp_proxy.TcpProxy._gateway_port
private

Definition at line 47 of file _tcp_proxy.py.

◆ _listen_socket

tests.unit._tcp_proxy.TcpProxy._listen_socket
private

Definition at line 56 of file _tcp_proxy.py.

◆ _northbound_data

tests.unit._tcp_proxy.TcpProxy._northbound_data
private

Definition at line 60 of file _tcp_proxy.py.

◆ _port

tests.unit._tcp_proxy.TcpProxy._port
private

Definition at line 55 of file _tcp_proxy.py.

◆ _proxy_socket

tests.unit._tcp_proxy.TcpProxy._proxy_socket
private

Definition at line 57 of file _tcp_proxy.py.

◆ _received_byte_count

tests.unit._tcp_proxy.TcpProxy._received_byte_count
private

Definition at line 51 of file _tcp_proxy.py.

◆ _sent_byte_count

tests.unit._tcp_proxy.TcpProxy._sent_byte_count
private

Definition at line 50 of file _tcp_proxy.py.

◆ _southbound_data

tests.unit._tcp_proxy.TcpProxy._southbound_data
private

Definition at line 61 of file _tcp_proxy.py.

◆ _stop_event

tests.unit._tcp_proxy.TcpProxy._stop_event
private

Definition at line 53 of file _tcp_proxy.py.

◆ _thread

tests.unit._tcp_proxy.TcpProxy._thread
private

Definition at line 64 of file _tcp_proxy.py.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:53