init namespace socket

This commit is contained in:
Sorrel Bri 2019-10-09 00:20:36 -07:00
parent 9380f0485c
commit 8fdd92f1c9

View file

@ -9,12 +9,12 @@ def handle_connection():
cool
''')
emit('message', {'data':'connection'})
emit('message', {'data':'connection'}, broadcast=True)
@socketio.on('message')
def handle_message(message):
print(message)
emit('message return', {'message':'a message was sent'}, broadcast=True)
emit('init namespace', {'namespace':'newroom'})
@socketio.on('connect', namespace='/newroom')
def handle_connection():