Skip to main content
Version: v0.0.7

Function: createClient()

createClient(opts): MllpClient

Create an MllpClient. Equivalent to new MllpClient(opts).

Parameters

opts

ClientOptions

Returns

MllpClient

Example

import { createClient } from '@cosyte/mllp';

const client = createClient({ host: 'localhost', port: 2575 });
await client.connect();
const ack = await client.send(payloadBuffer);
await client.close();