on_connection_request Event
Fired when a request for connection comes from a remote host.
Syntax
class WebSocketProxyConnectionRequestEventParams(object): @property def address() -> str: ... @property def port() -> int: ... @property def accept() -> bool: ... @accept.setter def accept(value) -> None: ... # In class WebSocketProxy: @property def on_connection_request() -> Callable[[WebSocketProxyConnectionRequestEventParams], None]: ... @on_connection_request.setter def on_connection_request(event_hook: Callable[[WebSocketProxyConnectionRequestEventParams], None]) -> None: ...
Remarks
This event indicates an incoming connection. The connection is accepted by default. Address and Port will contain information about remote host requesting the inbound connection. If you want to refuse it, you can set the Accept parameter to False.