Please sign in to comment.
adopt gevent-websocket interface
* ws4py.server.geventserver.WebSocketServer can now be used as the server from gevent-websocket * Made middleware call the application if the request is regular HTTP and not WebSocket. * Converted UpgradableWSGIHandle into something more simpler, that just exposes the underline socket always and gives application means to take ownership of it. This works as following: 1) UpgradableWSGIHandle sets environ['wsgi.socket'] to connection's socket. 2) After the application is done, UpgradableWSGIHandle checks if environ['wsgi.socket.detach'] flag is set. If it is, it silently exits without processing application's return value, reading/writing anything from the socket. The socket is not closed by the server. This functionality probably can be moved into gevent server. It can also be implemented by other servers. * Switched arguments: replaced APP(websocket, environ) with APP(environ, websocket) That way the same application callable can be used for HTTP and WebSocket apps.
- Loading branch information...
Showing with 47 additions and 78 deletions.