Article View: borland.public.cppbuilder.internet.socket
Article #1868TIdHTTPServerf
From: Christer Borgqvist
Date: Mon, 16 Oct 2006 21:39
Date: Mon, 16 Oct 2006 21:39
44 lines
2061 bytes
2061 bytes
Hello all,
I have a TIdHTTPServer and in the Connect event i do like this
dataptr = new TServDataObj(this);
dataptr->OnIoInfo = IoInfoEvent;
AThread->Data = dataptr;
in the IdHTTPServerCommandGet like this
TServDataObj *dataptr;
dataptr = (TServDataObj*)AThread->Data;
dataptr->xmlVal = RequestInfo->Params->Values["trans"];
if ( dataptr->xmlVal.Length() > 10 ) {
dataptr->Exequte();
ResponseInfo->ContentStream = new
TStringStream(dataptr->sResponse);
ResponseInfo->ContentStream->Write("OK", 2 );
}
and in the dataptr i do this
typedef void __fastcall (__closure *TIoInfoEvent)(System::TObject* Sender,
AnsiString &Msg, AnsiString &Seqno, AnsiString &sReturnInfo, AnsiString
&sTextid, int &seq);
__fastcall TServDataObj::TServDataObj(TObject* Sender)
{
}
void __fastcall TServDataObj::Exequte()
{
//call a function and fire the event OnIoInfo
}
if ( FOnIoInfo && SDiDspTxt.Length() ) {
OnIoInfo(this, SDiDspTxt, seqno, sReturnInfo, sTxtId, F_localseqno);
the problem is that in the Taskmanager i can se that the handles is
increase every time i fire the event, why?
Christer
Technical Details
Message-ID:
<4533fc25@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,e98299ee94200151,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 16 Oct 2006 23:39:50 +0200 From: Christer Borgqvist <christer.borgqvist10@bredband.net> User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: TIdHTTPServerf Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 85.225.118.159 Message-ID: <4533fc25@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1161034789 85.225.118.159 (16 Oct 2006 14:39:49 -0700) Lines: 45 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail