Write a Python server for C2 (C2 Error)

  • 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:

    <img src="http://i.imgur.com/RGNeaGR.png" border="0" />

    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()

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)