django-socketio icon indicating copy to clipboard operation
django-socketio copied to clipboard

How to send message...

Open Arti3DPlayer opened this issue 11 years ago • 0 comments

I have event:

@on_message
def message(request, socket, context, message):
    print message

When i try to connect and send message:

from websocket import create_connection
ws = create_connection("ws://127.0.0.1:9000/")
ws.send("Hello, World")

I receive error:

websocket._exceptions.WebSocketException: Handshake status 200

In another try i create view - send message to url and the same result...

Arti3DPlayer avatar Aug 31 '14 15:08 Arti3DPlayer