🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TIdTCPServer Command Handler

#4752
From: Remy Lebeau (TeamB)
Date: Wed, 29 Dec 2004 19:03
24 lines
1787 bytes
"Ronny" <potapenko@chez.com> wrote in message
news:41d2f642$1@newsgroups.borland.com...

> I have a Simple question. I'm using Indy and I'm doing a chat server
> with TCPServer. I'm using the command handlers way to do it.
> 1. So if I have understand the thing correctly, I don't need an OnExecute
> method. Right ?

Correct.  The Command Handlers and OnExecute are mutually exclusive.  If
there is at least 1 Command Handler and the CommandHandlersEnabled property
is true then OnExecute is never triggered and does not need to be assigned.

> 2. what is the best way to handle te disconnection from clients ?
> (The client sent a QUIT message to say that he leaves the chat)

Set the Disconnect property of the "QUIT" Command Handler to true.

> Do I need an onDisconnect method ?

No.


Gambit
Technical Details
Message-ID: <41d2ff3d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41d2f642$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,d17d5067aebc2759
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: <41d2f642$1@newsgroups.borland.com>
Subject: Re: TIdTCPServer Command Handler
Date: Wed, 29 Dec 2004 11:03:39 -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: <41d2ff3d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1104346941 68.69.17.41 (29 Dec 2004 11:02:21 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail