🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Multi-threaded TCP Server with Indy 9

#2671
From: Remy Lebeau (TeamB)
Date: Fri, 10 Mar 2006 18:46
24 lines
1676 bytes
"Martin" <martin@styleworx.com> wrote in message
news:441145d6$1@newsgroups.borland.com...

> Does anybody has a C++ example for a multi-threaded
> TIdTcpServer using Indy 9?

What exactly do you want an example of?  Please be more specific.

> I want to create a thread for each TCP connection, to handle
> different communication states.

TIdTCPServer handles that for you automatically.  You don't have to do
anything yourself, other than to assign handers to the desired component
events.

> I did this before with TServerSocket, but had no chance to make it stable.

Then you probably weren't using it properly in the first place.
TServerSocket is very stable component.  I have used it to make numerous
multi-threaded servers in several different versions of BCB.


Gambit
Technical Details
Message-ID: <4411c95f$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeder.wxs.nl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <441145d6$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,77f2a3a304e17124
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: <441145d6$1@newsgroups.borland.com>
Subject: Re: Multi-threaded TCP Server with Indy 9
Date: Fri, 10 Mar 2006 10:46:21 -0800
Lines: 26
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: <4411c95f$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1142016351 68.69.17.41 (10 Mar 2006 10:45:51 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeder.wxs.nl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail