Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
undeprecate, move sections
Browse files Browse the repository at this point in the history
adriangb authored Jan 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 71e0377 commit 2972e22
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions specs/www.rst
Original file line number Diff line number Diff line change
@@ -236,17 +236,18 @@ Keys:
ignored. Optional; if missing defaults to ``False``.


Disconnect - ``receive`` event
''''''''''''''''''''''''''''''
Disconnected Client - ``send`` exception
''''''''''''''''''''''''''''''''''''''''

.. note::
If ``send()`` is called on a closed connection the server must raise
a server-specific subclass of ``IOError``.
Applications may catch this exception and do cleanup work before
re-raising it or returning with no exception.
Servers must be prepared to catch this exception if they raised it and
should not log it as an error in their server logs.

The ``http.disconnect`` event is deprecated and will be removed in
the next major version of the spec (3.0).
It has been replaced by the server raising an specific subclass
of ``IOError`` if ``send()`` is called on a closed connection.
Servers MUST catch this exception if the application doesn't do so
such that it doesn't get propagated to server logs.
Disconnect - ``receive`` event
''''''''''''''''''''''''''''''

Sent to the application if receive is called after a response has been
sent or after the HTTP connection has been closed. This is mainly useful
@@ -428,15 +429,6 @@ keys may be present, however.
Disconnect - ``receive`` event
''''''''''''''''''''''''''''''

.. note::

The ``websocket.disconnect`` event is deprecated and will be removed in
the next major version of the spec (3.0).
It has been replaced by the server raising an specific subclass
of ``IOError`` if ``send()`` is called on a closed connection.
Servers MUST catch this exception if the application doesn't do so
such that it doesn't get propagated to server logs.

Sent to the application when either connection to the client is lost, either from
the client closing the connection, the server closing the connection, or loss of the
socket.

0 comments on commit 2972e22

Please sign in to comment.