Menu

How do I know if all data send out ?

Hongde liu
2013-01-26
2013-05-17
  • Hongde liu

    Hongde liu - 2013-01-26

    from the specification, for data packet:

       The next 32-bit field in the header is for the messaging. The first
       two bits "FF" flags the position of the packet is a message. "10" is
       the first packet, "01" is the last one, "11" is the only packet, and
       "00" is any packets in the middle. The third bit "O" means if the
       message should be delivered in order (1) or not (0). A message to be
       delivered in order requires that all previous messages must be either
       delivered or dropped. The rest 29 bits is the message number, similar
       to packet sequence number (but independent). A UDT message may
       contain multiple UDT packets.

    but from the UDT-JAVA library , there is no mentioned, so how do I know all of the data send out well?

     
  • Bernd Schuller

    Bernd Schuller - 2013-01-26

    hi,

    udt-java does not support the messaging mode of UDT, only streaming

     
  • Hongde liu

    Hongde liu - 2013-01-27

    Hmm… but the description has no relationship with messaging mode or streaming mode, it is only about "data packet"

    once we put the "data packet" to udtoutputstream, we also need to know if the begining of the data and also the ending of the data stream

     
  • Bernd Schuller

    Bernd Schuller - 2013-01-27

    hi,

    the text you quoted refers to the messaging mode.

    In streaming mode, you are right, there is no way to know that all data has been sent (you cannot just close the stream as in TCP) . So usually you have to send the amount of data in advance.

     
  • Hongde liu

    Hongde liu - 2013-01-27

    hmm…

    if the text only refers to the messaging mode , for a streaming mode , the field "message number " should thrown, but for the library , the field "message number " existed there

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.