Write a Python server for C2 (C2 Error)

Get help using Construct 2

Post » Sun Aug 25, 2013 3:10 am

Hi folks, ive trying to use the C2 Websocket plugin with a Python + Tornado server to no avail.

Im using the connection string "ws://localhost:9999" and nothing happens... The 'On Connection Opened' event never fires BUT if i add an "On Connection Error" event C2 crashes with the following message:


Im not sure if im doing something wrong Server Side or C2 side.
Thanks for your help!

My server code is:
import tornado.ioloop
import tornado.web

class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello, world")

application = tornado.web.Application([
    (r"/", MainHandler),
])

if __name__ == "__main__":
    application.listen(9999)
    tornado.ioloop.IOLoop.instance().start()Fersis2013-08-25 03:30:42
B
14
S
6
Posts: 14
Reputation: 1,868

Post » Sun Aug 25, 2013 2:02 pm

You probably need to set up your firewall to allow connections through pot 9999.

That error message looks like a bug - you should post it to the Bugs forum.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Sun Aug 25, 2013 2:20 pm

Hi thanks for the reply!
Ive opened the port in the Win7 firewall, but the same happens.
No incoming connection in the server.

I can connect to ws://echo.websocket.org just fine, so the issue has to be on the server side.

Thanks!
B
14
S
6
Posts: 14
Reputation: 1,868


Return to How do I....?

Who is online

Users browsing this forum: newday198913 and 6 guests