code: function TCPStream(opts) {
          assert.object(opts, 'options');
          assert.optionalString(opts.host, 'options.host');
          assert.optionalNumber(opts.port, 'options.port');
  
          var self = this;
  
          SyslogStream.call(this, opts);
  
          this.host = opts.host || '127.0.0.1';
          this.port = opts.port || 514;
  
          this.queue = [];
  
          (function connect(event) {
                  if (self.socket) {
                          if (self.listeners(event).length > 1) {
                                  self.emit.apply(self, arguments);
                                  return;
                          }
  
                          PROXY_EVENTS.forEach(function (e) {
                                  self.socket.removeAllListeners(e);
                          });
                          self.socket.removeAllListeners('close');
                          self.socket.removeAllListeners('error');
                          if (self.socket.destroy) {
                                  self.socket.destroy();
                          }
                  }
  
                  self.socket = createSocket({
                          host: self.host,
                          port: self.port,
                          proxy: self
                  });
                  self.socket.on('close', setTimeout.bind(null, connect, 1000));
                  self.socket.on('error', setTimeout.bind(null, connect, 1000));
                  self.socket.once('connect', function () {
                          self.queue.forEach(function (buf) {
                                  self.socket.write(buf);
                          });
                  });
          }());
  }
docs: --- API