[英]Send HL7 using VB.NET with MLLP
i am trying to send hl7 using vb.net with mllp , can anybody tell me that is the wrong of my code 我正在尝试使用vlp.net和mllp发送hl7,有人可以告诉我这是我的代码的错误吗
Dim StartBlock As String = "0x0b" ' this is start block <SB>
Dim EndBlock As String = " 0x0d" ' this is end Block <EB>
Dim ReturnBlock As String = "0x1c" ' this is return <CR>
Msg = StartBlock & Msg & EndBlock & ReturnBlock
Dim networkStream As NetworkStream = tcpClient.GetStream()
If networkStream.CanWrite And networkStream.CanRead Then
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(Msg)
networkStream.Write(sendBytes, 0, sendBytes.Length)
end if
You exchanged endblock and returnblock. 您交换了endblock和returnblock。 So swap them
所以交换他们
Dim EndBlock As String = "0x1c" ' this is end Block <EB>
Dim ReturnBlock As String = "0x0d" ' this is return <CR>
As I am not familiar with Visual Basic, I do not guarantee that the syntax definition of your blocks is correct, could also be &H0D
or similar. 因为我不熟悉Visual Basic,所以我不保证您块的语法定义正确,也可以是
&H0D
或类似名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.