How to disconnect socket io?

0 favourites
  • 4 posts
From the Asset Store
Shark.io
$49 USD
Shark.io in the sea full of killer sharks, Sunday of life is the game. Who knows what is happening under the sea?
  • I tried to create multiplayer game using socket.io. When i tried to disconnect socket io at client, i got this error. Can anyone help me?

    Thanks for any help!

    Client

    <img src="http://i49.tinypic.com/2uggo4p.png" border="0" />

    Server

    <img src="http://i47.tinypic.com/2rrpg06.png" border="0" />

    Error

    <img src="http://i50.tinypic.com/34ydaf4.png" border="0" />

  • What socket.io plugin are you using?

    There are several versions of the plugin currently on the forums, so it would be helpful to share which are you utilizing!

    Cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I used this version, thank you. dropbox.com/s/wbot32mika12r75/Socket%20io.rar

    <img src="smileys/smiley1.gif" border="0" align="middle" />

    I opened edittime.js:

    "author": "Original work: Zack0Wack0 - LastDataElement modifications by juantar, minify by Johnny Sheffield",

  • Ahh, ok, that's the modifed version of zack0wack0's plugin.

    please post any questions about this plugin

    here.

    Not sure what's the problem here, but i think you should set your own configuration on how the client behaves, please refer to this

    I think the problem occurs somewhere around here; but i cannot tell without more info!

         instanceProto.connect = function(host,port)

         {          

              var socket = this.socket;

              //problem here?

              if(socket != undefined || socket != null)

                   socket["disconnect"]();

              

              this.lastAddress = host;

              this.lastPort = port;

              

                 //or problem here, maybe?

              socket = window["io"]["connect"]('http://' + host + ':' + port, {'force new connection': true});

    Cheers!

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