Interface: MessageChannel
Defined in: netconf/src/transport/channel.ts:35
A connection with RFC 6242 framing on top: it delivers whole messages and frames outgoing ones. Open one with openChannel.
Properties
framing
readonly framing: FramingMode;Defined in: netconf/src/transport/channel.ts:39
The current framing mode.
peer
readonly peer: ConnectionPeer;Defined in: netconf/src/transport/channel.ts:37
Who the underlying connection talks to.
Methods
close()
close(): Promise<void>;Defined in: netconf/src/transport/channel.ts:53
Close the underlying connection. Idempotent; never rejects.
Returns
Promise<void>
destroy()
destroy(): void;Defined in: netconf/src/transport/channel.ts:51
Stop delivering messages and drop the stream at once. Idempotent.
Returns
void
encode()
encode(message): Uint8Array;Defined in: netconf/src/transport/channel.ts:45
Frame a message without sending it, so a caller can find out before committing to a send whether it can be framed at all.
Parameters
message
string
Returns
Uint8Array
Throws
FramingError if EOM framing can't carry it (it contains ]]>]]>).
useChunkedFraming()
useChunkedFraming(): void;Defined in: netconf/src/transport/channel.ts:49
Switch both directions to chunked framing. Takes effect from the next message.
Returns
void
write()
write(framed): void;Defined in: netconf/src/transport/channel.ts:47
Write a message framed by encode().
Parameters
framed
Uint8Array
Returns
void