I'm sorry for ignoring the node for so long. I took some days off from work for an exam -.- I've read the whole discussion and I'd like to thank you for your replies.

As above mentioned the UDP packet size is never bigger than 65535 bytes, and the read won't last 10 secs either.

While sending out the hexdump the server will notice the heartbeat and will send a response after it sent the data. The server will always respond to the heartbeat. Also we know for sure, that there is no hexdump which contains only one byte. They have several types and the smallest is around 20 bytes.

The server can do with some delay in receiving the heartbeat. For testing it's fine to set up the timer to send heartbeat in every 9.9 secs.

"The sending of the hexdumps is initiated by the server, when they become available; provided that is within 10 seconds of a heartbeat." It's possible that we start the server and there is no hexdump ready. So it is possible that we have to wait for several minutes for the first hexdump to come. The client continues to send the heartbeats regardless of it receives no data.

I hope I've answered everything that wasn't clear.


In reply to Re^13: UDP connection by falstad
in thread UDP connection by falstad

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.