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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:59:55+00:00 2026-06-09T20:59:55+00:00

I am just learing about networking and I belive there’s something called dynamic ports.

  • 0

I am just learing about networking and I belive there’s something called “dynamic ports”.
I can’t get my head around that, how would I implement a server, that uses dynamic ports? When setting up a socket, I’ll have to bind to a specific port just like:

using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
{
    IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1234);
    socket.Bind(endPoint);
    socket.Listen(10);
    using (Socket handler = socket.Accept())
    {
        /* ... */
    }
}

I needed to definly set the port I wantet to listen on (1234).
As far as I understand dynamic ports, a client sends a request to a random port and the server somehow dermines which application will get those request and make a response.

How would the client say

I would like my request to be responded my the “MyCustomService01” application?

Can someone please clarify and give some sample code?

  • 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-09T20:59:57+00:00Added an answer on June 9, 2026 at 8:59 pm

    socket is your listener, that despatches onto ephemeral ports; if you look carefully at handler, in particular at .LocalEndPoint and .RemoteEndPoint, you should find it is already configured as a dynamic port. Basically, you shouldn’t have to do anything special here – just communicate via handler.

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

Sidebar

Related Questions

I just started learning about Lucene and I get how it can be very
I'm just learning about dynamic memory allocation, but there is one thing i'd like
I'm just messing around learning about JavaScript and I wanted to change the color
Just learning about Dependency Injection and Prism... It seems just asking around alot of
I'm just learning about SproutCore now, seems great. But I can't find a good
I just started learning about servers, and I am messing around with Google's App
Just learning about sql joins and things, and I have a question. Can you
I'm just learning about Collection Operators and my first example isn't working. How can
Just learning about mercurial's --style and --template options that can be used on hg
I am learning about require.js and think I am just missing something. I don't

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.