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

  • SEARCH
  • Home
  • 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 6475989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:46:14+00:00 2026-05-25T06:46:14+00:00

I can either send data throughout the udp protocol with the UdpClient.Send(byte array) or

  • 0

I can either send data throughout the udp protocol with the UdpClient.Send(byte array) or the UdpClient.Client.Send(stream) method. both methods work. the only differences are that on one method I pass a byte array and on the other I pass a stream.

quick example:

UdpClient udpClient = new UdpClient(localEndPoint);
// I can eather send data as:
udpClient.Send(new byte[] { 0, 1, 2 }, 3);
udpClient.Client.Send(new byte[5]);

Also which method will ensure that my data reaches it’s destination without loosing information? I have read that the udp protocol does not ensure that all bytes reach it’s destination thus is better for streaming video, audio but not for transferring files like I am doing. The reason why I am using udp instead of tcp is because it is very complicated to establish a tcp connection between two users that happen to be behind a router. I know it will be possible if one of the users enables port forwarding on his router. I managed to send data by doing what is called udp punch holing. udp punch holing enables you to establish a connection between two users that are behind a router with the help of a server. It will be long to explain how that work in here you can find lot’s of information if you google it. Anyways I just wanted to let you know why I was using udp instead tcp. I don’t now if it will be possible to send a file with this protocol making sure that no data is lost. maybe I have to create an algorithm. or maybe the UdpClient.Client.Send method ensures that data will be received and the UdpClient.Send method does not ensure that data will be received.

  • 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-25T06:46:14+00:00Added an answer on May 25, 2026 at 6:46 am

    UDP does not guarantee data delivery or order of them. It only guarantees if you receive packet successfully, the packet is complete. You need to make your network communication reliable with your own implementation. The two functions should not make any difference.

    UNIX Network Programming has a chapter for this topic. (22.5 Adding Reliability to a UDP Application). You can also take a look at libginble which supports NAT traversal function (with STUN or relay) and reliability of communication.

    This article, Reliability and Flow Control, might also help you to understand one possible way to implement it. Good Luck!

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

Sidebar

Related Questions

How can I send keyboard input messages to either the currently selected window or
The output of my JSON call can either be an Array or a Hash.
I am wondering how I can send data between a machine and a mobile
Is there a way I can send data to my PDF file, (fill in
SSL can either be explicit or implicit as explained by this link: http://help.globalscape.com/help/secureserver2/Explicit_versus_implicit_SS.htm System.Net.Mail
I've noticed that the wmd editor can either output HTML or markdown. Does it
How would I define an element that can either contain plain text or contain
We have got a setup where users can either use a web-based form or
The documentation implies that you can either have 3D rendering or framebuffer mode, and
I have a variable that can either contain a list of strings or a

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.