mllp

package
v0.0.0-...-7dedf00 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mllp contains functionality for encoding and decoding HL7 messages for transmission using the MLLP protocol. See here for the specification: http://www.hl7.org/documentcenter/public_temp_670395EE-1C23-BA17-0CD218684D5B3C71/wg/inm/mllp_transport_specification.PDF

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadMsg

func ReadMsg(r io.Reader) ([]byte, error)

ReadMsg from reader and removes the start block, end block, and carriage return bytes. The reader must return a single message, any trailing bytes may be consumed.

func WriteMsg

func WriteMsg(writer io.Writer, msg []byte) error

WriteMsg wraps an HL7 message in the start block, end block, and carriage return bytes required for MLLP transmission and then writes the wrapped message to writer.

Types

type MessageReader

type MessageReader struct {
	// contains filtered or unexported fields
}

MessageReader consumes MLLP messages from a stream.

func NewMessageReader

func NewMessageReader(r io.Reader) *MessageReader

NewMessageReader to unwrap MLLP messages the provided stream.

func (*MessageReader) Next

func (mr *MessageReader) Next() ([]byte, error)

Next message in the reader. Unwraps the inner message by removing the start block, end block, and carriage return bytes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL