Article View: borland.public.cppbuilder.internet.socket
Article #5640Re: How to obtain a free local port automatical ?
From: Remy Lebeau (TeamB)
Date: Mon, 28 Jun 2004 16:50
Date: Mon, 28 Jun 2004 16:50
23 lines
1825 bytes
1825 bytes
"Karsten Leick" <Karsten.Leick@cetecom.de> wrote in message news:40e02f4d$1@newsgroups.borland.com... > Now i am looking for the best way to find a > free port adress for the "BoundIP" property. BoundIP is not a port number. It is an IP address, specifically the IP address of the local network address that you want the component to read/write its data from. Unless you are behind a firewall/router, or have multiple network adapters installed, you usually don't have to assign the BoundIP at all. The socket stack can look at the Host you are trying to connect to and then pick the appropriate adapter to work with. > I remember that there was a way for TServerSocket > like assigning a "0" to the port and to get a free > one automatic assigned when opening the socket. That still applies with Indy as well. Simply set the BoundPort property to 0 (which it is already set to by default). Gambit
Technical Details
Message-ID:
<40e04d32$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40e02f4d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,4d3f7a57e188cdef X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <40e02f4d$1@newsgroups.borland.com> Subject: Re: How to obtain a free local port automatical ? Date: Mon, 28 Jun 2004 09:50:24 -0700 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.169.168.124 Message-ID: <40e04d32$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1088441650 68.169.168.124 (28 Jun 2004 09:54:10 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail