public PackageInfo ResolvePackage(byte[] buffer)
        {
            PackageInfo package = new PackageInfo();

            ParserResult result = protocol.Parse(buffer);

            if (result.MessageAccepted)
            {
                package.Request        = result.ParsedMessage;
                package.Key            = result.ParsedMessage.MessageID;
                package.Acknowledgment = result.Acknowledge;
            }
            return(package);
        }
        protected override HL7Request ProcessMatchedRequest(byte[] readBuffer, int offset, int length)
        {
            byte[] msg = new byte[length];
            Array.Copy(readBuffer, offset, msg, offset, length);

            ParserResult result = m_Protocol.Parse(msg);

            HL7Request request = new HL7Request();

            if (result.MessageAccepted)
            {
                request.Request        = result.ParsedMessage;
                request.Acknowledgment = result.Acknowledge;

                request.Key  = "V" + result.ParsedMessage.HL7Version.Replace(".", "");
                request.Key += result.ParsedMessage.MessageID;
            }
            return(request);
        }