socket.lastUsed = Date.now(); socket.setNoDelay(true);
this.processHttp(self.wsprocessor, socket, data); } else { if (!!self.setNoDelay) { socket.setNoDelay(true);
net.createServer(socket => { // todo: develop a method to determine if auth/xml policy socket // todo: do not instantiate GameClient or configure socket if auth socket. socket.session = new GameClient(socket); socket.setKeepAlive(true); socket.setNoDelay(true); socket.on('data', data => { if (socket.session.rc4) { //data = socket.session.rc4.decrypt(data); } let buffer = Buffer.from(data); buffer = new ByteBuf(buffer); /* TODO: Decrypt the buffer. */ socket.session.handlePacket(buffer); }); })
}; this._socket = net.connect(Number(this.address.port), this.address.hostname); this._socket.setNoDelay(this.options.noDelay); this.conn = new Connection({ socket: this._socket,
_connect() { this._socket = net.connect(Number(this.address.port), this.address.hostname); this._socket.setNoDelay(this.options.noDelay); this._socket.setTimeout(this.options.connectTimeout, () => { const err = new Error('socket#' + this.url + ' connect timeout(' + this.options.connectTimeout + 'ms)');
const url = new URL(addr) const conn = net.connect(url.port, url.hostname) conn.setNoDelay(true) conn.setKeepAlive(true) conn.once('error', (err) => {
mongoConnection.setNoDelay(true);
const url = new URL(addr) const conn = net.connect(url.port, url.hostname) conn.setNoDelay(true) conn.setKeepAlive(true) conn.once('error', (err) => {