🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
2 messages
2 total messages Started by Rasid Thu, 27 Oct 2005 11:18
Multi-threaded TCP server
#3209
Author: Rasid
Date: Thu, 27 Oct 2005 11:18
11 lines
1586 bytes
I wanted to write a multi-threaded tcp server application using Indy's
TIdTCPServer. But I couldn't find how to integrate the thread object (that I
wrote seperately from the tcp project and included in with its header) with
the thread manager (ThreadMgr) of the server. The thread manager has a
property called ThreadClass to determine the type of thread instances that
it creates. Now the question is 'how can I make this ThreadClass property
represent the thread object that I wrote.'
Any suggestion for writing a multi-threaded tcp server application is also
very welcome.

Rasid
Re: Multi-threaded TCP server
#3213
Author: Remy Lebeau (TeamB)
Date: Thu, 27 Oct 2005 16:43
17 lines
1441 bytes
"Rasid" <rasid.pac@bilten.metu.edu.tr> wrote in message
news:4360b6d0$1@newsgroups.borland.com...

> The thread manager has a property called ThreadClass to
> determine the type of thread instances that it creates. Now
> the question is 'how can I make this ThreadClass property
> represent the thread object that I wrote.'

Set the Server's ThreadClass, not the ThreadMgr's:

     IdTCPServer1.ThreadClass = __classid(TMyThread);

Make sure that your class derives from TIdPeerThread.


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads