xref: /third_party/node/test/parallel/test-net-socket-no-halfopen-enforcer.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_cirequire('../common');
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_ci// This test ensures that `net.Socket` does not inherit the no-half-open
51cb0ef41Sopenharmony_ci// enforcer from `stream.Duplex`.
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ciconst { Socket } = require('net');
81cb0ef41Sopenharmony_ciconst { strictEqual } = require('assert');
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ciconst socket = new Socket({ allowHalfOpen: false });
111cb0ef41Sopenharmony_cistrictEqual(socket.listenerCount('end'), 1);
12

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