🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: using TIdTCPServer

#3951
From: Remy Lebeau (TeamB)
Date: Fri, 06 May 2005 20:46
28 lines
2073 bytes
"Simon Guertin" <sguertin_AT@trellianetworks.com> wrote in message
news:427bc89c$1@newsgroups.borland.com...

> is'nt the method iDTCPServerExecute will be called by many
> objects at the same time

Yes.

> and change my local variables?

No.  Local variables are just that - local.  Each call of a function has its
own copy of the local variables from every other call of the same function.
Each thread also has its own stack, so multiple threads will not step over
each other's stack.  The stack is used for storing local variables, setting
up function calls, and other miscellaneous things (temporary values, etc)
that the compiler needs.

> I need the store the client's retreived info in the Thread's Data object?

Yes.  Alternatively, you can derive a new class from TIdPeerThread to
include additional properties/methods, and then cast the event handler's
AThread to your custom class type when needed.  You would also have to set
the server's ThreadClass property so it knows which class type to
instantiate for each client.


Gambit
Technical Details
Message-ID: <427bd735$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <427a2a63$1@newsgroups.borland.com> <427a508e@newsgroups.borland.com> <427a6397@newsgroups.borland.com> <427a776d$1@newsgroups.borland.com> <427bc89c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2b2bb416a158f43e
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <427a2a63$1@newsgroups.borland.com> <427a508e@newsgroups.borland.com> <427a6397@newsgroups.borland.com> <427a776d$1@newsgroups.borland.com> <427bc89c$1@newsgroups.borland.com>
Subject: Re: using TIdTCPServer
Date: Fri, 6 May 2005 13:46:22 -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: <427bd735$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115412277 68.69.17.41 (6 May 2005 13:44:37 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail