Article View: borland.public.cppbuilder.internet.socket
Article #5643Re: How to obtain a free local port automatical ?
From: Karsten
Date: Tue, 29 Jun 2004 10:14
Date: Tue, 29 Jun 2004 10:14
55 lines
2500 bytes
2500 bytes
Yep, sorry. I meant BoundPort, just mixed it up in the post. You are exactly right, it's working fine. My Problem was a wrong assignment to the Port due to an input field, i have used for the port assignment, which was unfortunately hidden exactly under the one i though which was used ;) May be a "copy&paste" accident. Sorry for confusion and have great thanks for your efforts on helping me ! Karsten. "Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> schrieb im Newsbeitrag news:40e04d32$1@newsgroups.borland.com... > > "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:
<40e140e5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40e02f4d$1@newsgroups.borland.com> <40e04d32$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: "Karsten" <karsten.leick@cetecom.de> Newsgroups: borland.public.cppbuilder.internet.socket References: <40e02f4d$1@newsgroups.borland.com> <40e04d32$1@newsgroups.borland.com> Subject: Re: How to obtain a free local port automatical ? Date: Tue, 29 Jun 2004 12:14:02 +0200 Lines: 57 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: 217.225.54.209 Message-ID: <40e140e5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1088504037 217.225.54.209 (29 Jun 2004 03:13:57 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail