我试图发送hl7使用vb.net与mllp,谁能告诉我,这是我的代码错误
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发布于 2016-04-12 04:49:00
您交换了endblock和returnblock块。所以交换它们吧
Dim EndBlock As String = "0x1c" ' this is end Block <EB>
Dim ReturnBlock As String = "0x0d" ' this is return <CR>由于我不熟悉Visual Basic,我不能保证你的代码块的语法定义是正确的,也可以是&H0D或类似的。
https://stackoverflow.com/questions/36555080
复制相似问题