Skip to content

Interface: SessionOptions ​

Defined in: netconf/src/messages/session.ts:58

Options for openSession.

Properties ​

capabilities? ​

ts
readonly capabilities?: readonly string[];

Defined in: netconf/src/messages/session.ts:60

Capabilities to advertise in addition to base:1.0 and base:1.1.


logger? ​

ts
readonly logger?: Logger;

Defined in: netconf/src/messages/session.ts:70

Where the session logs. Default: no logging. See Logging and tracing.


logLevel? ​

ts
readonly logLevel?: "trace" | "debug" | "info" | "warn" | "error" | "silent";

Defined in: netconf/src/messages/session.ts:72

Least severe level passed to the logger. Default 'trace': everything.


maxInFlight? ​

ts
readonly maxInFlight?: number;

Defined in: netconf/src/messages/session.ts:64

Most RPCs awaiting a reply at once; later ones queue. Default 32, or the maxInFlight quirk.


maxMessageBytes? ​

ts
readonly maxMessageBytes?: number;

Defined in: netconf/src/messages/session.ts:66

Largest message accepted from the server, in bytes; see DecoderOptions.maxMessageBytes. Default 64 MiB.


onHello? ​

ts
readonly onHello?: (hello) => HelloAdjustments | undefined;

Defined in: netconf/src/messages/session.ts:83

Called synchronously with the server's hello, before the session opens and before any later message is handled. If it throws, the session fails.

Parameters ​

hello ​

ServerHello

Returns ​

HelloAdjustments | undefined


parseLimits? ​

ts
readonly parseLimits?: XmlParseLimits;

Defined in: netconf/src/messages/session.ts:68

Depth and node limits for every message received, checked before it is parsed.


quirks? ​

ts
readonly quirks?: SessionQuirks;

Defined in: netconf/src/messages/session.ts:78

Quirks known before the hello. Explicit options above take precedence.


redact? ​

ts
readonly redact?: (xml) => string;

Defined in: netconf/src/messages/session.ts:74

Applied to message bodies before trace logging and the message event. Default: mask password-like elements.

Parameters ​

xml ​

string

Returns ​

string


signal? ​

ts
readonly signal?: AbortSignal;

Defined in: netconf/src/messages/session.ts:76

Aborts the hello exchange.


timeouts? ​

ts
readonly timeouts?: SessionTimeouts;

Defined in: netconf/src/messages/session.ts:62

Hello, RPC and close timeouts. Defaults: DEFAULT_SESSION_TIMEOUTS.

Released under the MIT Licence.