Skip to content

Function: joinConnections() ​

ts
function joinConnections(a, b): void;

Defined in: netconf/src/transport/join.ts:9

Splice two connections together: what either receives, the other sends; when either ends its side, the other ends; when either closes, the other is dropped. For example, serve a FakeServer over a real transport with joinConnections(duplexConnection(channel, { peer }), server.connection).

Parameters ​

a ​

Connection

b ​

Connection

Returns ​

void

Released under the MIT Licence.