• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Missing UDP Packets

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am using UDP for file send and receive. I know that, it is not reliable. But my boss advise to use UDP only. So, while receiving the packets (due to fast sending and slow receiving) some of the packets are missing. I already slow down the sending part. still some of the packets are missing. So, Can any one give me that code sample for, how to trace missing UDP packets and how to resend it back.

Thanks.

Regards,
Prabhakaran

 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
UDP is not reliable, so there is no notification for missing packets. Your code needs to decide when a packet is missing -maybe after a certain lapse of time-, and request it again from the sender, thereby duplicating what TCP does, but most likely much slower.

As an aside, it has already been pointed out that the underlying reason for using UDP instead if TCP is highly likely to be flawed; you should direct whoever told you otherwise to these discussions.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
UDP should only be used in case where missing one or two packets does not seriously affect the outcome - as in online games where each packet is a self-contained scene update.

Using UDP for file transfer is preposterous - you would have to reinvent TCP/IP or BitTorrent. Surely you have mis-understood your boss's requirement as no sensible IT person would ever say that.

Bill
 
Sheriff
Posts: 22788
131
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or the boss is in IT without having any knowledge of anything IT related. Unfortunately that happens. Try to convince him that UDP is really not a good solution; you can refer him to your other thread if he doesn't believe you. If he still doesn't believe you it may be time to look for another job. Any job with someone in charge who has no knowledge yet undermines your advice even with proper motivation is not a job I would like.
 
Goodbye moon men. Hello tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic