@@ -28,37 +28,38 @@ with a focus on correctness, simplicity, robustness, and performance.
28
28
29
29
It supports several network I/O and control flow paradigms.
30
30
31
- 1. The primary implementation builds upon :mod: `asyncio `, Python's standard
32
- asynchronous I/O framework. It provides an elegant coroutine-based API. It's
33
- ideal for servers that handle many clients concurrently.
34
-
35
- .. admonition :: As of version :ref:`13.0`, there is a new :mod:`asyncio`
36
- implementation.
37
- :class: important
38
-
39
- The historical implementation in ``websockets.legacy `` traces its roots to
40
- early versions of websockets. Although it's stable and robust, it is now
41
- considered legacy.
42
-
43
- The new implementation in ``websockets.asyncio `` is a rewrite on top of
44
- the Sans-I/O implementation. It adds a few features that were impossible
45
- to implement within the original design.
46
-
47
- The new implementation provides all features of the historical
48
- implementation, and a few more. If you're using the historical
49
- implementation, you should :doc: `ugrade to the new implementation
50
- <howto/upgrade>`. It's usually straightforward.
31
+ 1. The default implementation builds upon :mod: `asyncio `, Python's built-in
32
+ asynchronous I/O library. It provides an elegant coroutine-based API. It's
33
+ ideal for servers that handle many client connections.
51
34
52
35
2. The :mod: `threading ` implementation is a good alternative for clients,
53
36
especially if you aren't familiar with :mod: `asyncio `. It may also be used
54
- for servers that don't need to serve many clients .
37
+ for servers that handle few client connections .
55
38
56
39
3. The `Sans-I/O `_ implementation is designed for integrating in third-party
57
40
libraries, typically application servers, in addition being used internally
58
41
by websockets.
59
42
60
43
.. _Sans-I/O : https://sans-io.readthedocs.io/
61
44
45
+ Refer to the :doc: `feature support matrices <reference/features >` for the full
46
+ list of features provided by each implementation.
47
+
48
+ .. admonition :: The :mod:`asyncio` implementation was rewritten.
49
+ :class: tip
50
+
51
+ The new implementation in ``websockets.asyncio `` builds upon the Sans-I/O
52
+ implementation. It adds features that were impossible to provide in the
53
+ original design. It was introduced in version 13.0.
54
+
55
+ The historical implementation in ``websockets.legacy `` traces its roots to
56
+ early versions of websockets. While it's stable and robust, it was deprecated
57
+ in version 14.0 and it will be removed by 2030.
58
+
59
+ The new implementation provides the same features as the historical
60
+ implementation, and then some. If you're using the historical implementation,
61
+ you should :doc: `ugrade to the new implementation <howto/upgrade >`.
62
+
62
63
Here's an echo server using the :mod: `asyncio ` API:
63
64
64
65
.. literalinclude :: ../example/echo.py
0 commit comments