🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Multiple TIdTCPServer

#4876
From: Willie
Date: Fri, 03 Dec 2004 13:55
37 lines
2253 bytes
Hello Remy:

Thank you very much.

Willie.

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> ���g��l��s�D
:41b03338@newsgroups.borland.com...
>
> "Willie" <Willie.nospam@nospam.pchome.com.tw> wrote in message
> news:41aff392@newsgroups.borland.com...
>
> > For some reason, I needed to setup the binding ports at runtime.
> > How can I setup the binding ports at runtime programmatically?
>
> Have you not read the Indy documentation yet?  TIdTCPServer has a Bindings
> property, which in turn has an Add() method.  Before activating the
server,
> aall Add() first and then set the IP and Port of the new TIdSocketHandle
> instance that Add() returns.  For example:
>
>     IdTCPServer1->Bindings->Clear();
>
>     TIdSocketHandle *pBinding = IdTCPServer1->Bindings->Add();
>     pBinding->IP = "192.168.1.1";
>     pBinding->Port = 4000;
>
>     pBinding = IdTCPServer1->Bindings->Add();
>     pBinding->IP = "192.168.1.1";
>     pBinding->Port = 4001;
>
>     IdTCPServer1->Active = true;
>
>
> Gambit
>
>
Technical Details
Message-ID: <41b06d88$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41af3d4c$1@newsgroups.borland.com> <41af46ae$1@newsgroups.borland.com> <41afd835$1@newsgroups.borland.com> <41afed35$1@newsgroups.borland.com> <41aff392@newsgroups.borland.com> <41b03338@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,bcb11f40fbaab32b
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII
From: "Willie" <Willie.nospam@nospam.pchome.com.tw>
Newsgroups: borland.public.cppbuilder.internet.socket
References:  <41af3d4c$1@newsgroups.borland.com> <41af46ae$1@newsgroups.borland.com> <41afd835$1@newsgroups.borland.com> <41afed35$1@newsgroups.borland.com> <41aff392@newsgroups.borland.com> <41b03338@newsgroups.borland.com>
Subject: Re: Multiple TIdTCPServer
Date: Fri, 3 Dec 2004 21:55:32 +0800
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 211.20.227.67
Message-ID: <41b06d88$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1102081416 211.20.227.67 (3 Dec 2004 05:43:36 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail