Lines Matching refs:client
45 const client = net.createConnection(port);
47 client.connections = 0;
49 client.setEncoding('utf8');
51 client.on('connect', function() {
53 client.recved = '';
54 client.connections += 1;
57 client.on('data', function(chunk) {
61 client.on('end', function() {
62 client.end();
65 client.on('error', function(e) {
70 client.on('close', function(had_error) {
73 assert.strictEqual(client.recved.length, bytes);
75 if (client.fd) {
76 console.log(client.fd);
78 assert.ok(!client.fd);