aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Twisted/py3/twisted/web/websocket.py
blob: ab926d90538330c143c19435ce7e65d6ed7cce8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- test-case-name: twisted.web.test.test_websocket -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

"""
Websocket (rfc6455) client and server support.

For websocket servers, place a L{WebSocketResource} into your Twisted Web
resource hierarchy.

For websocket clients, create a new endpoint via L{WebSocketClientEndpoint.new}
with the WebSocket server URL and then, on the newly created endpoint, call
L{WebSocketClientEndpoint.connect}.

Both client-side and server-side application code must conform to
L{WebSocketProtocol}.

@note: To use this module, you must install Twisted's C{websocket} extra, i.e.
    C{pip install twisted[websocket]}.
"""

from ._websocket_impl import (
    ConnectionRejected,
    WebSocketClientEndpoint,
    WebSocketClientFactory,
    WebSocketProtocol,
    WebSocketResource,
    WebSocketServerFactory,
    WebSocketTransport,
)

__all__ = [
    "ConnectionRejected",
    "WebSocketClientEndpoint",
    "WebSocketClientFactory",
    "WebSocketProtocol",
    "WebSocketResource",
    "WebSocketServerFactory",
    "WebSocketTransport",
]