Skip to content

Commit b2b01aa

Browse files
committed
Minor refactor of some parts of docs
1 parent 14d6bef commit b2b01aa

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

docs/examples.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,10 @@ This can be overcomed by periodically polling the server, but it is not an elega
322322
Response is initialized on ``return``, events can be sent using ``.send_event()`` method. Due to the nature of SSE, it is necessary to store the
323323
response object somewhere, so that it can be accessed later.
324324

325-
**Because of the limited number of concurrently open sockets, it is not possible to process more than one SSE response at the same time.
326-
This might change in the future, but for now, it is recommended to use SSE only with one client at a time.**
325+
326+
.. warning::
327+
Because of the limited number of concurrently open sockets, it is **not possible to process more than one SSE response at the same time**.
328+
This might change in the future, but for now, it is recommended to use SSE **only with one client at a time.**.
327329

328330
.. literalinclude:: ../examples/httpserver_sse.py
329331
:caption: examples/httpserver_sse.py
@@ -344,8 +346,9 @@ This is anologous to calling ``.poll()`` on the ``Server`` object.
344346
The following example uses ``asyncio``, which has to be installed separately. It is not necessary to use ``asyncio`` to use Websockets,
345347
but it is recommended as it makes it easier to handle multiple tasks. It can be used in any of the examples, but here it is particularly useful.
346348

347-
**Because of the limited number of concurrently open sockets, it is not possible to process more than one Websocket response at the same time.
348-
This might change in the future, but for now, it is recommended to use Websocket only with one client at a time.**
349+
.. warning::
350+
Because of the limited number of concurrently open sockets, it is **not possible to process more than one Websocket response at the same time**.
351+
This might change in the future, but for now, it is recommended to use Websocket **only with one client at a time**.
349352

350353
.. literalinclude:: ../examples/httpserver_websocket.py
351354
:caption: examples/httpserver_websocket.py
@@ -390,7 +393,7 @@ Using ``.serve_forever()`` for this is not possible because of it's blocking beh
390393

391394
Each server **must have a different port number**.
392395

393-
In order to distinguish between responses from different servers a 'X-Server' header is added to each response.
396+
To distinguish between responses from different servers a 'X-Server' header is added to each response.
394397
**This is an optional step**, both servers will work without it.
395398

396399
In combination with separate authentication and diffrent ``root_path`` this allows creating moderately complex setups.
@@ -433,5 +436,5 @@ This is the default format of the logs::
433436
If you need more information about the server or request, or you want it in a different format you can modify
434437
functions at the bottom of ``adafruit_httpserver/server.py`` that start with ``_debug_...``.
435438

436-
NOTE:
437-
*This is an advanced usage that might change in the future. It is not recommended to modify other parts of the code.*
439+
.. note::
440+
This is an advanced usage that might change in the future. It is not recommended to modify other parts of the code.

0 commit comments

Comments
 (0)