Your opinion will help to improve our service
Leave a feedback >Implements TCP chaos-proxy logic such as accepting incoming tcp client connections.
On each new connection new tcp client connects to server (host_to_server, port_to_server).
Public Member Functions | |
None | __init__ (self, GateRoute route, typing.Optional[EvLoop] loop=None) |
int | connections_count (self) |
Returns maximal amount of connections going through the gate at the moment. | |
None | wait_for_connections (self, *count=1, timeout=0.0) |
Wait for at least count connections going through the gate. | |
Protected Member Functions | |
typing.List[Socket] | _create_accepting_sockets (self) |
_connect_to_server (self) | |
None | _do_accept (self, Socket accept_sock) |
This task should wait for connections and create SocketPair. | |
Protected Attributes | |
_connected_event | |
_sockets | |
_loop | |
_to_server_intercept | |
_to_client_intercept | |
None pytest_userver.chaos.TcpGate.__init__ | ( | self, | |
GateRoute | route, | ||
typing.Optional[EvLoop] | loop = None |
||
) |
Reimplemented from pytest_userver.chaos.BaseGate.
|
protected |
|
protected |
Reimplemented from pytest_userver.chaos.BaseGate.
|
protected |
This task should wait for connections and create SocketPair.
Reimplemented from pytest_userver.chaos.BaseGate.
int pytest_userver.chaos.TcpGate.connections_count | ( | self | ) |
None pytest_userver.chaos.TcpGate.wait_for_connections | ( | self, | |
* | count = 1 , |
||
timeout = 0.0 |
|||
) |
|
protected |
|
protected |