Skip to content

Function: duplexConnection() ​

ts
function duplexConnection(stream, options): Connection;

Defined in: netconf/src/transport/duplex.ts:27

Turn a Node.js duplex stream into a Connection. A stream error is reported as the close's error at once, before the stream's own close, so an error class the transport chose (such as an AuthenticationError) reaches the session unchanged. See Your own transport.

Parameters ​

stream ​

Duplex

options ​

DuplexConnectionOptions

Returns ​

Connection

Released under the MIT Licence.