From 8fdd92f1c9ebccc9a76eff07a9cc74bcac1ed295 Mon Sep 17 00:00:00 2001 From: Sorrel Bri Date: Wed, 9 Oct 2019 00:20:36 -0700 Subject: [PATCH] init namespace socket --- websockets/socket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/websockets/socket.py b/websockets/socket.py index 12c5e9d..020a147 100644 --- a/websockets/socket.py +++ b/websockets/socket.py @@ -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():