• How come the sckt is undefined and conn is true?

    { "type": 0, 
      "#onconnect": function (n) { ... }, 
      "opt": { 
        "host": "example.com", 
        "port": 1235 }, 
      "sckt": undefined, "conn": true, 
      "dSnd": "", 
      "#ondata": function (e) { ... }, 
      "#onend": function () { ... }, 
      "dRcv": undefined }
    >
    
  • That's just the way it works. conn:true means that the actual connection succeeded (i think) - however when the socket is undefined it means the connection has now been closed

  • ...which means we have to check if sckt isnt undefined and conn is true in order to ensure that we have a working connection between the server, right?

  • Ideally you just hook onto the close and error events?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How come the `sckt is undefined` and `conn is true`?

Posted by Avatar for ceremcem @ceremcem

Actions