class documentation

class WebSocketClientFactory(typing.Protocol[_WSP]): (source)

View In Hierarchy

A WebSocketClientFactory is a factory for a particular kind of WebSocketProtocol that implements client-side websocket listeners via WebSocketClientEndpoint.

Method buildProtocol To conform to WebSocketServerFactory, you must implement a buildProtocol method which takes a string representing an URL and returns a WebSocketProtocol.
def buildProtocol(self, url: str) -> _WSP: (source) ΒΆ

To conform to WebSocketServerFactory, you must implement a buildProtocol method which takes a string representing an URL and returns a WebSocketProtocol.

Returns
_WSPa WebSocketProtocol that will handle the outgoing connection.