Article View: borland.public.cppbuilder.internet.socket
Article #4882Re: TIdPeerThread hook?
From: Remy Lebeau (TeamB)
Date: Fri, 03 Dec 2004 18:15
Date: Fri, 03 Dec 2004 18:15
26 lines
2039 bytes
2039 bytes
"Paul Machiaverna" <paul.machiaverna@i-stat.com> wrote in message
news:41b07de3$1@newsgroups.borland.com...
> I just found something at
http://www.indyproject.org/indy/Teams/Core/Docs/Standards/Misc.html
That article only applies to Indy's own programmers. They are required to
derive a new class from TIdPeerThread when writing new TIdTCPServer
descendants. That is not the case here. You are the application
programmer, and you are using an existing server component rather than
deriving a new one, so you can use the Data property instead.
That is not to say that you cannot derive a new class from TIdPeerThread and
use the ThreadClass property. But it is more work to do.
> Okay, that answers how to attach user data to a thread. Now, I
> just have to figure out the syntax for assigning a descendant class
> of TIdPeerThread to TIdTCPServer::ThreadClass! :-o
Use the classid keyword:
IdTCPServer1->ThreadClass = __classid(TMyCustomPeerThread);
Gambit
Technical Details
Message-ID:
<41b0ad2d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!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-mailReferences:
<41af854e$1@newsgroups.borland.com> <41af93ff$1@newsgroups.borland.com> <41b07de3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a67b5a7da45f80f8 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: <41af854e$1@newsgroups.borland.com> <41af93ff$1@newsgroups.borland.com> <41b07de3$1@newsgroups.borland.com> Subject: Re: TIdPeerThread hook? Date: Fri, 3 Dec 2004 10:15:07 -0800 Lines: 28 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: <41b0ad2d$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1102097709 68.69.17.41 (3 Dec 2004 10:15:09 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.wiretrip.org!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