我正在尝试使用带有 mllp 的 vb.net 发送 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