I am trying to host a websocket application in python in openshift. I found this repo: https://github.com/ramr/openshift-tornado-websockets , which uses a tornado for websocket and regular HTTP connection, I want to deal with ws and http, I successfully deployed the code over openshift. according to the code associated with the default 8000 internal port with opening, but when I tried to connect to ws: //piot-cloudap.rhcloud.com: 8000 / ws-echo / url end using python websocket client lib it connects to the ws url, but when I try to send some data and then try to get it back, it returns nothing but an empty string, can someone tell me what I'm doing wrong!
client code that is used:
ws = create_connection("ws://piot-cloudap.rhcloud.com:8000/ws-echo/") ws.send("test") result = ws.recv() print result
But it returns null.
Any help would be appreciated.
source share