code: function TcpStreamEnd () {
          this.simulator.Debug (3,"TcpStream [%s:%s] connection ended", simulator.opts.host, simulator.opts.port);
          delete ActiveClients[this];
          setTimeout (function(){ // wait for timeout and recreate a new Object from scratch
              simulator.TcpClient ();
          }, this.opts.timeout);
      }
docs: Remote server close connection let's retry it