heroku-python / flask-sockets

[DEPRECATED] Alternative: https://github.com/miguelgrinberg/flask-sock
MIT License
1.74k stars 164 forks source link

Using sockets with route pattern #23

Closed issackelly closed 8 years ago

issackelly commented 9 years ago

I've got the following code, and it will open and immediately close the websocket connection.

@sockets.route('/sockets/<channel>')
def echo_socket(ws):
    while True:
        message = ws.receive()
        ws.send(message)

Not quite sure if this is a feature request or a bug, but I think that WS routes should be able to accept flask route patterns.

philipn commented 9 years ago

In case you missed it, there's a PR over here to allow this behavior https://github.com/kennethreitz/flask-sockets/pull/18

issackelly commented 9 years ago

Thanks!

kennethreitz commented 8 years ago

This is now supported!

issackelly commented 8 years ago

:+1: