if name == "main":
application.listen(int(os.environ.get("PORT", 33510)))
tornado.ioloop.IOLoop.instance().start()
`
In the logs I get this:
at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=637157216530205865-0&b64=1" host=kotikgames.herokuapp.com request_id=81d4f05f-621e-4142-929b-8c0f809d9c11 fwd="37.214.61.46" dyno=web.1 connect=1ms service=3ms status=404 bytes=240 protocol=http
I use the Heroku hosting (python, tornado WebSocket) Unity:
var socket = IO.Socket("ws://******.herokuapp.com/"); socket.On(Socket.EVENT_CONNECT, () => { socket.Emit("hi"); Debug.Log("connected!"); }); socket.On("hi", (data) => { Debug.Log(data); socket.Disconnect(); }); socket.Connect();
Server: `class EchoWebSocket(websocket.WebSocketHandler): def open(self): print("Websocket Opened")application = tornado.web.Application([(r"/", EchoWebSocket),])
if name == "main": application.listen(int(os.environ.get("PORT", 33510))) tornado.ioloop.IOLoop.instance().start() ` In the logs I get this: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=637157216530205865-0&b64=1" host=kotikgames.herokuapp.com request_id=81d4f05f-621e-4142-929b-8c0f809d9c11 fwd="37.214.61.46" dyno=web.1 connect=1ms service=3ms status=404 bytes=240 protocol=http