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 8001099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:00:05+00:00 2026-06-04T16:00:05+00:00

I am creating a UDP Server.I found following code reference from MSDN.Can any one

  • 0

I am creating a UDP Server.I found following code reference from MSDN.Can any one please explain why they are using two IPEndPoint objects in the code sample.I assume second ipeEdpoint is the address of sender(Client). But how it is possible? Ip address of client can be extract from the Data gram packet, So what is the purpose for the second object here?This may be a simple and silly question but i am little confusing…:D

  byte[] data = new byte[1024];

  IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 9050);

  UdpClient newsock = new UdpClient(ipep);

  Console.WriteLine("Waiting for a client...");

  IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);

  data = newsock.Receive(ref sender);
  • 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-06-04T16:00:08+00:00Added an answer on June 4, 2026 at 4:00 pm

    The call to the UdpClient constructor passes in the hosts end point. Receive starts the process of receiving data–which won’t do anything until another process makes a request to the end point you created in the UdpClient constructor. When that connection does happen, the endpoint of the process sending data to your UdpClient will then be available. e.g. in the sender variable.

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

Sidebar

Related Questions

I'm creating 2 programs which one of them sends UDP packets from an Adnroid
creating 20 viewcontrollers and calling them one after the other from the mainviewcontroller as
Let me explain a bit the app i'm doing. I'm creating a central UDP
I am creating a winsock UDP program. code i am using is shown below.
I am creating a networking library in C# that I can use in any
Ive written the following echo server using UDP but i have no idea that
I am creating a UDP socket, and attempting to send to an existing server
I'm creating a chat server which accepts both TCP and UDP connections. Assume for
Creating a view with following code. - (void)loadView { paintView=[[UIView alloc]initWithFrame:CGRectMake(0, 50, 320, 430)];
Creating a Certificate authority signing request (Keychain Access, Certificate Assistant: Request Certificate from Certificate

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.