@@ -322,8 +322,10 @@ This can be overcomed by periodically polling the server, but it is not an elega
322
322
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
323
323
response object somewhere, so that it can be accessed later.
324
324
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. **.
327
329
328
330
.. literalinclude :: ../examples/httpserver_sse.py
329
331
:caption: examples/httpserver_sse.py
@@ -344,8 +346,9 @@ This is anologous to calling ``.poll()`` on the ``Server`` object.
344
346
The following example uses ``asyncio ``, which has to be installed separately. It is not necessary to use ``asyncio `` to use Websockets,
345
347
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.
346
348
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 **.
349
352
350
353
.. literalinclude :: ../examples/httpserver_websocket.py
351
354
:caption: examples/httpserver_websocket.py
@@ -390,7 +393,7 @@ Using ``.serve_forever()`` for this is not possible because of it's blocking beh
390
393
391
394
Each server **must have a different port number **.
392
395
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.
394
397
**This is an optional step **, both servers will work without it.
395
398
396
399
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::
433
436
If you need more information about the server or request, or you want it in a different format you can modify
434
437
functions at the bottom of ``adafruit_httpserver/server.py `` that start with ``_debug_... ``.
435
438
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