HL7 V 2.x communication utilizes pipe-messages to communicate. To send a message it must be in the form of a pipe-message in text. If you have a message object instead, save it to a pipe-message using SegmentStructureConverter.MessageToPipe.
Next, establish a standard TCP/IP connection to the server. In .NET, use the TcpClient.Connect method to do so.
If connecting is successful, proceed to actually sending the message. Start by creating an instance of an HL7Response. Then call HL7Response.Send. The HL7Response.Send method blocks until the transaction is completed. To check for the communication results, call HL7Response.IsFailureCode and HL7Response.TextMessage.
Now that the transaction is complete, close the TCP/IP connection (or reuse it for another transaction).
Note that the HL7Response automatically processes acknowledgment messages for you -- you do not need to do anything related to acknowledgment.
Building an HL7 Network Server
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET