I want to receive data sent by an Instrument(Cell Counter) which acts as a Client and Sends Data in HL7(Uses MLLP Protocol) Format to a LIS Server Which i am Developing in c#. However My server works fine when receiving normal Text messages. I've Searched on google but many solution were for sending HL7. I didn't found much about receiving HL7(MLLP) Data If Anybody Knows How to achieve this please share code Here is my Server Code:
using System; using System.IO.Ports; using System.Windows.Forms; using System.IO; using System.Text; using System.Linq; using System.Text.RegularExpressions; using SimpleTCP; using System.Net; using System.Net.Sockets; namespace RS232communication { public partial class Form1 : Form { string datain; // TcpListener server = null; SimpleTcpServer server; private void Form1_Load(object sender, EventArgs e) { this.WindowState = FormWindowState.Maximized; button2.Enabled = false; button1.Enabled = true; textBox1.ScrollBars = ScrollBars.Vertical; textBox3.ScrollBars = ScrollBars.Vertical; server = new SimpleTcpServer(); server.DataReceived += Server_DataReceived; } private void Server_DataReceived(object sender, SimpleTCP.Message e) { datain = e.MessageString; this.Invoke(new EventHandler(showdata)); } private void button1_Click(object sender, EventArgs e) { IPAddress ip =IPAddress.Parse(comboBox1.Text); server.Start(ip, Convert.ToInt32(comboBox5.Text)); // server = new TcpListener(IPAddress.Parse(comboBox1.Text), Convert.ToInt32(comboBox5.Text)); server.Start(); button2.Enabled = true; button1.Enabled = false; textBox2.Text += "Server Started"; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)