Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 191023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:18:21+00:00 2026-05-11T16:18:21+00:00

I don’t mean how to connect to a socket. What should I know about

  • 0

I don’t mean how to connect to a socket. What should I know about UDP programming?

  • Do I need to worry about bad data in my socket?
  • I should assume if I send 200bytes I may get 120 and 60 bytes separately?
  • Should I worry about another connection sending me bad data on the same port?
  • If data doesnt arrive typically how long may I (typically) not see data for (250ms? 1 second? 1.75sec?)

What do I really need to know?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:18:21+00:00Added an answer on May 11, 2026 at 4:18 pm

    “i should assume if i send 200bytes i
    may get 120 and 60bytes separately?”

    When you’re sending UDP datagrams your read size will equal your write size. This is because UDP is a datagram protocol, vs TCP’s stream protocol. However, you can only write data up to the size of the MTU before the packet could be fragmented or dropped by a router. For general internet use, the safe MTU is 576 bytes including headers.

    “i should worry about another
    connection sending me bad data on the
    same port?”

    You don’t have a connection, you have a port. You will receive any data sent to that port, regardless of where it’s from. It’s up to you to determine if it’s from the right address.

    If data doesnt arrive typically how
    long may i (typically) not see data
    for (250ms? 1 second? 1.75sec?)

    Data can be lost forever, data can be delayed, and data can arrive out of order. If any of those things bother you, use TCP. Writing a reliable protocol on top of UDP is a very non trivial task and there is no reason to do so for almost all applications.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't know when to add to a dataset a tableadapter or a query
I don't edit CSS very often, and almost every time I need to go
I don't understand where the extra bits are coming from in this article about
I don't know if anyone has seen this issue before but I'm just stumped.
Don't know if this has been answered before. Have custom routes to users. If
I don't know if this has been asked before, but what i'd like to
I don't have much PHP experience and I want to know how to best
I don't know how to explain to you the trouble by using faux columns.
I don't know why, but there is a problem I'm encountering with $.parseJSON when
I don't want PHP errors to display /html, but I want them to display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.