Interface ClientListenerOptions

interface ClientListenerOptions {
    autoConnect?: boolean;
    connectionTimeout?: number;
    encoding?: BufferEncoding;
    host?: string;
    ipv4?: boolean;
    ipv6?: boolean;
    maxAttempts?: number;
    maxConnectionAttempts?: number;
    maxConnections?: number;
    maxTimeout?: number;
    port: number;
    retryHigh?: number;
    retryLow?: number;
    socket?: TcpSocketConnectOpts;
    tls?: boolean | ConnectionOptions;
    waitAck?: boolean;
}

Hierarchy (view full)

Properties

autoConnect?: boolean

If set to false, you have to tell the system to start trying to connect by sending 'start' method.

true
connectionTimeout?: number

How long a connection attempt checked before ending the socket and attempting again. If this is set to zero, the client will stay connected. Min. is 0 (Stay Connected), and Max. is 60000 (60 seconds.) Use with caution.

0
encoding?: BufferEncoding

Encoding of the messages we expect from the HL7 message.

"utf-8"
host?: string

Host - You can do a FQDN or the IPv(4|6) address.

ipv4?: boolean

IPv4 - If this is set to true, only IPv4 address will be used and also validated upon installation from the hostname property.

false
ipv6?: boolean

IPv6 - If this is set to true, only IPv6 address will be used and also validated upon installation from the hostname property.

false
maxAttempts?: number

Max attempts to send the message before an error is thrown if we are in the process of re-attempting to connect to the server. Has to be greater than 1. You cannot exceed 50.

10
maxConnectionAttempts?: number

If we are trying to establish an initial connection to the server, let's end it after this many attempts. The time between re-connecting is determined by connectionTimeout. You cannot exceed 50.

1.1.0

30
maxConnections?: number

Max Connections this connection makes. Has to be greater than 1.

10
maxTimeout?: number

The number of times a connection timeout occurs until it stops attempting and just stops.

2.1.0

10
port: number

The port we should connect to on the server.

retryHigh?: number

Max delay, in milliseconds, for exponential-backoff when reconnecting

30_000
retryLow?: number

Step size, in milliseconds, for exponential-backoff when reconnecting

1000
socket?: TcpSocketConnectOpts

Additional options when creating the TCP socket with net.connect().

tls?: boolean | ConnectionOptions

Enable TLS, or set TLS specific options like overriding the CA for self-signed certificates.

waitAck?: boolean

Wait for ACK before sending a new message. If this is set to false, you can send as many messages as you want but since you are not expecting any ACK from a previous message sent before sending another one. This does not stop the "total acknowledgement" counter on the client object to stop increasing.

true *