Further clarify accept flow

This commit is contained in:
Andrew Godwin 2017-03-27 09:59:42 -07:00
parent cf788a3d7d
commit a9062e5d28

View File

@ -355,11 +355,12 @@ If received while the connection is waiting for acceptance after a ``connect``
message:
* If ``bytes`` or ``text`` is present, accept the connection and send the data.
* If ``accept`` is ``True``, accept the connection and do nothing else.
* If ``accept`` is ``False``, reject the connection (with close code 1000) and do nothing else.
* If ``accept`` is ``True``, accept the connection (and send any data provided).
* If ``accept`` is ``False``, reject the connection and do nothing else.
* If ``close`` is ``True`` or a positive integer, reject the connection. If
``bytes`` or ``text`` is also set, it should accept the connection, send the
frame, then immediately close the connection.
frame, then immediately close the connection. Note that any close code integer
sent is ignored, as connections are rejected with HTTP's ``403 Forbidden``.
If received while the connection is established: