🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: using TIdTCPServer

#3938
From: Remy Lebeau (TeamB)
Date: Thu, 05 May 2005 16:59
27 lines
1909 bytes
"Simon Guertin" <sguertin_AT@trellianetworks.com> wrote in message
news:427a2a63$1@newsgroups.borland.com...

> Hi, I am a long time Java user, so I think in Java a little bit. I
> need to create a TCP server and I would like to know if using
> the TIdTCPServer will be good for me or if I should implement
> a server that looks like this (at the bottom of the email):

TIdTCPServer already does exactly the same thing that your Java code is
doing.  When activated, it runs a continous loop that accepts new client
connections and spawns a thread for each one.

> my question is, : I need to know where to put all my processing
> of the connection.. other than in the TCPServerExecute() method
> of the IndyServer.

The OnExecute event *is* where you are supposed to place your processing
code.

> Should I re-write my own server..can I change the way the threads
> are started?

Why?  Do you have a problem with the way they are currently handled?


Gambit
Technical Details
Message-ID: <427a508e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <427a2a63$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2b2bb416a158f43e
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: <427a2a63$1@newsgroups.borland.com>
Subject: Re: using TIdTCPServer
Date: Thu, 5 May 2005 09:59:38 -0700
Lines: 29
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: <427a508e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115312270 68.69.17.41 (5 May 2005 09:57:50 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail