constructor()

in src/sinks/connections/TcpClient.ts [30:39]


  constructor(endpoint: IEndpoint) {
    this.endpoint = endpoint;
    this.socket = new net.Socket({ allowHalfOpen: true, writable: false })
      .setEncoding('utf8')
      .setKeepAlive(true)
      .setTimeout(5000) // idle timeout
      .on('timeout', () => this.disconnect('idle timeout'))
      .on('end', () => this.disconnect('end'))
      .on('data', data => LOG('TcpClient received data.', data)) as SocketExtended;
  }