Tcpip packet question

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Tcpip packet question

  • Creator
    Topic
  • #47996
    Lucy Maupin
    Participant

      We have a tpcip interface going to an in-house server. The programmer who wrote the receiving application is complaining that the messages are split across packets. Is this normal? Do most applications use the length encoding at the beginning of the message to identify the beginning and end of the message? Do we tell him to deal with it. Would a differernt PDL help? We have not seen this with a similar in-house tcpip connection.

    Viewing 2 reply threads
    • Author
      Replies
      • #57253
        Jim Kosloskey
        Participant

          Lucy,

          That programmer needs to learn about tcp/ip. It is not unusual and should be programmed for that messages will span packets.

          Moreover, the listener should send an acknowledgment of receipt for the message (even if it is NOT an HL/7 message set) to simplify message pacing. Obviously the Cloverleaf connection should be set up to expect an acknowledgment.

          Jim Kosloskey

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #57254
          Nathan Martin
          Participant

            Also, tell the programmer that multiple messages may be contained in one network packet or be split among packets.

            Nathan Martin

          • #57255
            Anonymous
            Participant

              I have another 2 cents…

              Just so you know, the reason that messages are transmitted with encoding is because it’s expected that you can’t rely on single packet transmissions.  So, your hl7 interfaces use mlp encoding characters for this purpose.

              The driver works like this:  See that there are bytes in the read buffer and analyze them looking for the beginning character (0b) and trash any characters that are in front of it.  Scan the rest of the bytes looking for the ending character.  If there isn’t an ending character, wait for some time out period.  If time out happens then trash the buffer and reset.  If you receive more bytes continue to analyze.

              When Cloverleaf times out waiting for a complete message it sends a message to the log, “No match, no more phrases to try”.

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.