A tokio codec implementation for the HL7 MLLP network protocol.
HL7's MLLP is a simple, single-byte-text based protocol for framing HL7 messages over a TCP (or similar) transport. The full specification is available at the HL7 site (Note that they place the standards behind a free membership/login form).
This crate provides a Codec implementation that encodes/decodes MLLP frames from a Tokio stream, allowing simple programmatic access to the messages (both primary and ack/nack).
Tokio (and the rust async ecosystem) is currently in a state of flux, however there are two simple (not production ready!) examples in the source, of both a publisher and a listener. NB. These examples just write output to the console, and this can seriously limit throughput. If you want to run some simple perf tests with the samples, ensure you minimise the amount of data written out.
Example
This is a highly simplified example, lifted from the Examples included in source control.
Publisher
use *;
use tokio;
use Framed;
use TcpStream;
use *;
use MllpCodec;
async