🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Restricting Local IP in TServerSocket

#5562
From: Remy Lebeau (TeamB)
Date: Thu, 05 Aug 2004 23:26
28 lines
1770 bytes
"Cagatay Undeger" <cagatay@interaktif.gen.tr> wrote in message
news:4112b291@newsgroups.borland.com...

> I tried what you proposed but did not work.

I've used it myself so I know that it does work.

Further investigation shows that it only works when the server is used in
blocking mode, though.  Are you using non-blocking instead?

> I created a class as follows:

You don't need that much code.  Just promote the existing property:

    class TMyServerSocket : public TServerSocket
    {
    public:
        __fastcall TMyServerSocket(TComponent *Owner) : TServerSocket(Owner)
{}
        __property Address;
    };

    TMyServerSocket * ServerSocket = new TMyServerSocket(NULL);
    ServerSocket->Address = ip;


Gambit
Technical Details
Message-ID: <4112c203$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <41129f35$1@newsgroups.borland.com> <4112a709$1@newsgroups.borland.com> <4112b291@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,275bb228249b0ef9
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: <41129f35$1@newsgroups.borland.com> <4112a709$1@newsgroups.borland.com> <4112b291@newsgroups.borland.com>
Subject: Re: Restricting Local IP in TServerSocket
Date: Thu, 5 Aug 2004 16:26:52 -0700
Lines: 30
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.69.17.41
Message-ID: <4112c203$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1091748355 68.69.17.41 (5 Aug 2004 16:25:55 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail