Jump to content
SubSpace Forum Network

difference between disconnect and close events?


Recommended Posts

Posted
Trying to troubleshoot why occasionally, my bot will not be in the zone, but still think its connected. I'm wondering if I need to handle the close events instead of just watching disconnects? Or maybe I need to add some code to process lag outs or lag coma?
Posted

Disconnect is fired when a connection simply disconnects from the server (for any reason). Close is fired when the connection not only disconnects but also closes, rendering it unusable for further communication.

 

Regarding the other issue, note that CNConnection.isConnected() only returns the state of the connection; it does not check if it's actually in the zone or not.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...