 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
David Pratt Guest
|
Posted: Wed Feb 28, 2007 7:09 am Post subject: How to determine what port to use? |
|
|
I have been researching this for a couple of days, and as the subject line
suggests, am new to network programming. Trying to figure out what the
parameters/standards on winsock port numbers are, how they are determined
and what they are used for, etc. Any tutorials out there or guidance to
such would be much appreciated. |
|
| Back to top |
|
 |
Eduardo Jauch Guest
|
Posted: Wed Feb 28, 2007 7:25 am Post subject: Re: How to determine what port to use? |
|
|
David Pratt escreveu:
| Quote: | I have been researching this for a couple of days, and as the subject line
suggests, am new to network programming. Trying to figure out what the
parameters/standards on winsock port numbers are, how they are determined
and what they are used for, etc. Any tutorials out there or guidance to
such would be much appreciated.
|
If you look on google and search for "winsock tutorial" you will find
lots of stuff. Some are really good :)
Eduardo |
|
| Back to top |
|
 |
Bob Gonder Guest
|
Posted: Wed Feb 28, 2007 8:25 am Post subject: Re: How to determine what port to use? |
|
|
David Pratt wrote:
| Quote: | I have been researching this for a couple of days, and as the subject line
suggests, am new to network programming. Trying to figure out what the
parameters/standards on winsock port numbers are, how they are determined
and what they are used for, etc. Any tutorials out there or guidance to
such would be much appreciated.
|
If for internal useage, just about any non-standard port should
suffice (unless, of course, you are trying to do standard stuff).
If you are out to build a large international app, then you might
register with iana
For my app, I selected a large unused port as my default, but allowed
the user to set their own in case of in-the-field conflicts.
The keeper of the ports:
http://www.iana.org/assignments/port-numbers
Something that came up with Google "tcp/ip ports":
http://www.chebucto.ns.ca/~rakerman/port-table.html
Well-Known TCP Port Numbers:
http://www.webopedia.com/quick_ref/portnumbers.asp |
|
| Back to top |
|
 |
David Pratt Guest
|
Posted: Wed Feb 28, 2007 9:10 am Post subject: Re: How to determine what port to use? |
|
|
"Bob Gonder" <notbg (AT) notmindspring (DOT) invalid> wrote in message
news:mcp9u2ltre7ltdjcvigv5u26o2uas8i6mq (AT) 4ax (DOT) com...
| Quote: | David Pratt wrote:
I have been researching this for a couple of days, and as the subject
line
suggests, am new to network programming. Trying to figure out what the
parameters/standards on winsock port numbers are, how they are determined
and what they are used for, etc. Any tutorials out there or guidance to
such would be much appreciated.
If for internal useage, just about any non-standard port should
suffice (unless, of course, you are trying to do standard stuff).
If you are out to build a large international app, then you might
register with iana
For my app, I selected a large unused port as my default, but allowed
the user to set their own in case of in-the-field conflicts.
The keeper of the ports:
http://www.iana.org/assignments/port-numbers
Something that came up with Google "tcp/ip ports":
http://www.chebucto.ns.ca/~rakerman/port-table.html
Well-Known TCP Port Numbers:
http://www.webopedia.com/quick_ref/portnumbers.asp
Thanks so much, Bob. Precisely what I was looking for. I would rather not |
muck around with reserved ports and inadvertantly crash my system through
ignorance |
|
| Back to top |
|
 |
Jason Tribbeck Guest
|
Posted: Thu Apr 05, 2007 12:19 am Post subject: Re: How to determine what port to use? |
|
|
David Pratt wrote:
| Quote: | Thanks so much, Bob. Precisely what I was looking for. I would rather not
muck around with reserved ports and inadvertantly crash my system through
ignorance
|
That would be quite difficult to do (if you're listening):
- If the port is in use, you wouldn't be able to listen in on it
- If the port isn't in use, it probably won't be
If you're happy to get the OS to assign a port, then you can use the
magic number "0".
Otherwise, ports > 4096 aren't often in use.
If you're opening to send, then you could have problems connecting to
assigned ports (although in these "high security" days, if you send then
stuff they don't understand, they should either ignore it, or close the
socket. Of course, this isn't guaranteed ).
--
..sig MIA |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|