Lines Matching refs:socket
38 function onSocket(socket) { argument
39 assert.strictEqual(socket.server, server);
47 socket.setNoDelay();
48 socket.timeout = 0;
50 socket.setEncoding('utf8');
51 socket.on('data', common.mustCall(function(data) {
55 assert.ok(socket.bufferSize >= 0 && socket.bufferSize <= 4);
57 assert.strictEqual(socket.writable, true);
58 assert.strictEqual(socket.readable, true);
62 socket.write('PONG', common.mustCall(function() {
67 socket.on('end', common.mustCall(function() {
68 assert.strictEqual(socket.allowHalfOpen, true);
69 assert.strictEqual(socket.writable, true); // Because allowHalfOpen
70 assert.strictEqual(socket.readable, false);
71 socket.end();
74 socket.on('error', common.mustNotCall());
76 socket.on('close', common.mustCall(function() {
77 assert.strictEqual(socket.writable, false);
78 assert.strictEqual(socket.readable, false);
79 socket.server.close();