Article View: borland.public.cppbuilder.internet.socket
Article #1432Re: TidTCPServer and disconnections problems
From: Stefano Bonifazi
Date: Tue, 16 Jan 2007 14:13
Date: Tue, 16 Jan 2007 14:13
25 lines
2138 bytes
2138 bytes
Thankkkkkkkkk UUUUU :)) I had to keep work stopped for some days coz of those problems :( Well I'm a real novice with Indy, and all I learnt about it, it's thanks to Ur previous posts ) > DO NOT assign the ThreadMgr.ThreadClass property directly. > TIdTCPServer handles that internally for you. Assign only the > TIdTCPServer's own ThreadClass property. The ThreadMgr.ThreadClass is > assigned automatically while the server is being activated. Well the problem was that I set TIdTCPServer active at designe time, so ThreadMgr.ThreadClass was never assigned by itself! > You must synchronize that with the main thread. You cannot create MDI > child windows outside of the main thread context. Yes I managed to do that with a TidSync descendant class ) I got rid of all the try-catch blocks and used a custom descendant of TIdPeerThread, now Indy does all for me: allocating, deallocating .. so even if my clients disconnects, or my server shuts down, i get no more windows error messages(following to exeptions)! Thank U very much again! Stefano B
Technical Details
Message-ID:
<45acdd55@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45a7f92c@newsgroups.borland.com> <45a803d7$1@newsgroups.borland.com> <45a8c3c4@newsgroups.borland.com> <45abdf15@newsgroups.borland.com> <45ac8f8b$1@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: Tue, 16 Jan 2007 15:13:00 +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> <45abdf15@newsgroups.borland.com> <45ac8f8b$1@newsgroups.borland.com> In-Reply-To: <45ac8f8b$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.104.236.124 Message-ID: <45acdd55@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1168956757 80.104.236.124 (16 Jan 2007 06:12:37 -0800) Lines: 25 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail