xref: /third_party/node/test/parallel/test-net-connect-reset-before-connected.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst net = require('net');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciconst server = net.createServer();
61cb0ef41Sopenharmony_ciserver.listen(0);
71cb0ef41Sopenharmony_ciconst port = server.address().port;
81cb0ef41Sopenharmony_ciconst socket = net.connect(port, common.localhostIPv4, common.mustNotCall());
91cb0ef41Sopenharmony_cisocket.on('error', common.mustNotCall());
101cb0ef41Sopenharmony_ciserver.close();
111cb0ef41Sopenharmony_cisocket.resetAndDestroy();
121cb0ef41Sopenharmony_ci// `reset` waiting socket connected to sent the RST packet
131cb0ef41Sopenharmony_cisocket.destroy();
14

Indexes created Thu Nov 07 10:32:03 CST 2024