class documentation
class WebSocketClientEndpoint: (source)
Constructor: WebSocketClientEndpoint.new(reactor, url, tlsPolicy, connectTimeout, ...)
A WebSocketClientEndpoint
describes an URL to connect to and a way of connecting to that URL, that can connect a WebSocketClientFactory
to that URL.
Class Method | new |
Construct a WebSocketClientEndpoint from a reactor and a URL. |
Async Method | connect |
Make an outgoing connection to this WebSocketClientEndpoint 's HTTPS connection. |
Class Variable | endpoint |
an IAgentEndpointFactory that constructs agent endpoints when connect |
Class Variable | url |
the URL to connect to. |
@classmethod
def new(cls, reactor:
def new(cls, reactor:
IReactorTCP
, url: str
, tlsPolicy: IPolicyForHTTPS
= BrowserLikePolicyForHTTPS(), connectTimeout: int | None
= None, bindAddress: bytes | None
= None) -> WebSocketClientEndpoint
:
(source)
¶
Construct a WebSocketClientEndpoint
from a reactor and a URL.
Parameters | |
reactor:IReactorTCP | The reactor to use for the TCP connection. |
url:str | a string describing an URL where a websocket server lives. |
tlsIPolicyForHTTPS | The TLS policy to use for HTTPS connections. |
connectint | None | The number of seconds for the TCP-level connection timeout. |
bindbytes | None | The bind address to use for the TCP client connections. |
Returns | |
WebSocketClientEndpoint | the newly constructed endpoint. |
Make an outgoing connection to this WebSocketClientEndpoint
's HTTPS connection.
Parameters | |
protocolWebSocketClientFactory[ | The constructor for the protocol. |
Returns | |
_WSP | A coroutine (that yields Deferred s) that completes with the connected WebSocketProtocol once the websocket connection is established. |