unbit / uwsgi

uWSGI application server container
http://projects.unbit.it/uwsgi
Other
3.46k stars 691 forks source link

Websocket API does not allow to set CloseEvent attributes (code, reason and wasClean) #1926

Open marc1n opened 6 years ago

marc1n commented 6 years ago

It seems that there is no way to set custom code and reason when closing websocket connection in Python application (WebSocket Connection Close Code and Reason Protocol Spec: https://tools.ietf.org/html/rfc6455#section-7.1.5).

Please add uwsgi.websocket_close(code, reason) to uwsgi API to allow an application to set custom code and reason.

tinylambda commented 5 years ago

+1