Client Class

The main class that starts a client connection to a valid HL7 TCP/MLLP specified server.

1.0.0

Hierarchy

  • EventEmitter
    • default

Constructors

  • This creates a new client to a new server connection. This is the remote side in which we will connect. Then using the createConnection method, you establish a connection to the port.

    Parameters

    Returns default

    1.0.0

    const client = new Client({host: '0.0.0.0'})
    

Methods

  • Connect to a listener to a specified port.

    Parameters

    • props: ClientListenerOptions

      This individual port connections which can override the main server connection properties. Some properties from the server build could be defaulted if not specified here.

    • cb: OutboundHandler

      The function that the client will process if and when they get a response from the server. It follows an async/await function.

    Returns Connection

    1.0.0

    const outGoing = client.createOutbound({port: 3000}, async (res: InboundResponse) => {})
    

    Review the InboundResponse on the properties returned.

  • Get the host that we will connect to. The port might be different from each different "connection"

    Returns string

    1.1.0

  • Total sent messages in this object lifetime.

    Returns number

    2.0.0