🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1151

Re: How to determine what port to use?

#1151
From: Jason Tribbeck
Date: Wed, 04 Apr 2007 19:19
22 lines
1867 bytes
David Pratt wrote:

>   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
Technical Details
Message-ID: <4613fa47$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45e4d601@newsgroups.borland.com> <mcp9u2ltre7ltdjcvigv5u26o2uas8i6mq@4ax.com> <45e4f5ca$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,eefbc5ce70c2e09b
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 04 Apr 2007 20:19:32 +0100
From: Jason Tribbeck <newsmaster9@tribbeck.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: How to determine what port to use?
References: <45e4d601@newsgroups.borland.com> <mcp9u2ltre7ltdjcvigv5u26o2uas8i6mq@4ax.com> <45e4f5ca$1@newsgroups.borland.com>
In-Reply-To: <45e4f5ca$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 82.68.159.209
Message-ID: <4613fa47$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1175714375 82.68.159.209 (4 Apr 2007 12:19:35 -0800)
Lines: 22
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail