Bookmark and Share

Author Topic: Why not port 0?  (Read 9523 times)

0 Members and 1 Guest are viewing this topic.

Offline trpted

  • PcWinTech Guru
  • ******
  • Join Date: Sep 2011
  • Posts: 1,142
  • Karma: 37
Why not port 0?
« on: May 07, 2013, 01:41:35 PM »
I told your port listen to TCP port 0, but it listened on port TCP 1102

How come?

Thank you
Private messages (PM) are not for support questions or for hints to not yet answered topics. The PMs are basically for confident conversation between the users, off the forum.

PcWinTech.com Forums

Why not port 0?
« on: May 07, 2013, 01:41:35 PM »

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Why not port 0?
« Reply #1 on: May 07, 2013, 02:16:20 PM »
Windows doesnt have a port 0. It is 1 - 65535

When my port listener tried to attach to port 0 windows must have gave it a different port.

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Why not port 0?
« Reply #2 on: May 07, 2013, 02:19:47 PM »
Quote
Configuring a new socket connection requires assigning a TCP or UDP port number. Instead of hard-coding a particular port number, or writing code that searches for an available port on the local system, network programmers can instead specify port 0 as a connection parameter. That triggers the operating system to automatically search for and return the next available port in the dynamic port number range.

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

PcWinTech.com Forums

Re: Why not port 0?
« Reply #2 on: May 07, 2013, 02:19:47 PM »

 

email