Saturday, 17 August 2013

sending websocket data via python?

sending websocket data via python?

I am trying to create a python program that sets up a websocket client and
send some data to it.
I have learned that the data it sends isn't exactly in ASCII and if i try
socket.send(b"Hello websocket!"), this will fail for me. I have used the
create your own test example on http://www.websocket.org/echo.html and
when I wiresharked the data that it sends to the websocket, it wireshark
doesn't display the sent data in readable characters. Also, when I view
the data it sent in c array's, it's different values every time I run it.
I can't figure out how it translates the "WebSocket rocks" text into
something that will work. How would I be able to accomplish translating
the message being sent in python?

No comments:

Post a Comment