Lines Matching refs:connection
8 // Open 2 connections (connection 0 and connection 1).
11 // Closes connection 0.
12 // Open 2 more connections (connection 2 and 3).
21 console.error(`creating connection ${index}`);
24 const connection = net.createConnection(server.address().port, function() {
31 connection.on('error', function(err) {
36 connection.on('data', function(e) {
37 console.error(`connection ${index} received response`);
41 connection.on('end', function() {
46 connections[index] = connection;
51 console.error(`closing connection ${index}`);