kernelsauce / turbo

Turbo is a framework built for LuaJIT 2 to simplify the task of building fast and scalable network applications. It uses a event-driven, non-blocking, no thread design to deliver excellent performance and minimal footprint to high-load applications while also providing excellent support for embedded uses.
http://turbo.readthedocs.io/
Apache License 2.0
525 stars 84 forks source link

WebSocket URL matching #328

Open max1220 opened 6 years ago

max1220 commented 6 years ago

The WebSocketHandler's :open() does not seem to support URL matching, like the web.RequestHandler does. I'm writing an application that generates a token on an login page and also uses WebSockets to communicate with the server. At the moment I need to send the token to the server via websockets to authenticate the newly opened websocket, as I don't want to send my token with every request.

Supporting a syntax like the web.RequestHandler would allow me to add the websocket to the trusted list of websockets on open.

kernelsauce commented 6 years ago

Its designed to support it, strange that it does not work now... Can take a look at it.