🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TidTCPServer and disconnections problems

#1524
From: Stefano Bonifazi
Date: Mon, 15 Jan 2007 20:08
23 lines
2361 bytes
Hi!

> Well at first I did not use TUpdateData, but I have been getting Access 
> violation Exceptions, so I moved the switch block inside the 
> Synchronized class, but nothing has changed (( .. before, without 
> deriving from TIdPeerThread all worked well (before I used to allocate 
> my class data in a thread safe class, inside the OnConnect event handler 
> and assigning it to the data member of TIdPeerThread)!! What am I 
> mistaken with in the new code? I even tried to pass TNodzClientThread 
> pointer to TUpdateData in its constructor, instead of reinterpreting 
> this pointer inside TUpdateData method, but nothing changed ((

I've found that the matter was in assigning the ThreadClass of the indy 
TCPServer and not the one of its ThreadMgr member... so the constructor 
of my thread class were never called.. and so I kept getting access 
violations! Now that is fixed, but inside my custom thread I gotta 
create a new MDI window for each new client that connects.. anyway 
creating those inside the new thread context made them not responding to 
windows messages(( ... is there a workaround maybe synchronizing that 
creation? or should I revert to the non custom threads, and allocating 
custom data inside OnConnect with thread safe code?
Thank U in advance!
Stefano B.
Technical Details
Message-ID: <45abdf15@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45a7f92c@newsgroups.borland.com> <45a803d7$1@newsgroups.borland.com> <45a8c3c4@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,827d16ab792ef887
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 15 Jan 2007 21:08:11 +0100
From: Stefano Bonifazi <stefboombastic@email.it>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: TidTCPServer and disconnections problems
References: <45a7f92c@newsgroups.borland.com> <45a803d7$1@newsgroups.borland.com> <45a8c3c4@newsgroups.borland.com>
In-Reply-To: <45a8c3c4@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 80.104.231.165
Message-ID: <45abdf15@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1168891669 80.104.231.165 (15 Jan 2007 12:07:49 -0800)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail