Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • You've needlessly limited your throughput to 10KB per file per round trip time. If you're only sending one file and you're sending it around the world, you'll limit to about 400Kbps for pretty much no reason. Also, you use the word "packet" to mean an application protocol data unit. You should really avoid doing this as creates all kinds of confusion. Perhas you want "message"? Commented Aug 19, 2016 at 10:51
  • @DavidSchwartz I've updated the question. Commented Aug 19, 2016 at 11:54
  • 1
    In a working TCP implementation data will never be lost in the way you describe. You can have your sending program transmit a megabyte in an instant, and your receiving program read a byte per second, and everything will still work and no data will be lost. You must examine what the problem was that led to your losing data in what you describe as your "spamming" architecture, because whatever it is, it is a bug, and could spontaneously lead to data loss in other circumstances. Commented Aug 19, 2016 at 11:54
  • @MartinKochanski I expressed it too unclear. No data is being lost. The "packets"/messages are being split, and therefore the application does not recognize the incoming data (no header) as valid and discards it. Commented Aug 19, 2016 at 11:57
  • @Blacktempel That's just a bug in your code that you need to fix. Commented Aug 19, 2016 at 16:08