Exemple #1
0
        public string SendMessage(string message)
        {
            var stream = m_Client.GetStream();

            Llp.WriteMessage(stream, message);
            var ackMessage = Llp.ReadMessage(stream);

            return(ackMessage);
        }
Exemple #2
0
 private void ProcessConnection(TcpClient client)
 {
     using (var stream = client.GetStream())
     {
         while (true)
         {
             var message = Llp.ReadMessage(stream);
             if (message == null)
             {
                 break;
             }
             var e = new HL7MessageEventArgs();
             e.Message = message;
             MessageReceived?.Invoke(this, e);
             if (e.AckMessage != null)
             {
                 Llp.WriteMessage(stream, e.AckMessage);
             }
         }
     }
 }