🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TidTCPServer and disconnections problems

#1428
From: Remy Lebeau (TeamB)
Date: Tue, 16 Jan 2007 08:41
30 lines
2100 bytes
"Stefano Bonifazi" <stefboombastic@email.it> wrote in message
news:45abdf15@newsgroups.borland.com...

> I've found that the matter was in assigning the ThreadClass of the
> indy TCPServer and not the one of its ThreadMgr member...

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.

> inside my custom thread I gotta create a new MDI window for each
> new client that connects..

You must synchronize that with the main thread.  You cannot create MDI
child windows outside of the main thread context.

> anyway creating those inside the new thread context made them not
> responding to windows messages((

That is only one of several reasons why you can't create them in the
context of worker threads.

> is there a workaround maybe synchronizing that creation?

You already know how to do that.


Gambit
Technical Details
Message-ID: <45ac8f8b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45a7f92c@newsgroups.borland.com> <45a803d7$1@newsgroups.borland.com> <45a8c3c4@newsgroups.borland.com> <45abdf15@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
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <45a7f92c@newsgroups.borland.com> <45a803d7$1@newsgroups.borland.com> <45a8c3c4@newsgroups.borland.com> <45abdf15@newsgroups.borland.com>
Subject: Re: TidTCPServer and disconnections problems
Date: Tue, 16 Jan 2007 00:41:08 -0800
Lines: 32
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: 75.83.34.171
Message-ID: <45ac8f8b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1168936843 75.83.34.171 (16 Jan 2007 00:40:43 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail