Re: Greeting still being sent?

Giganews Newsgroups
Subject: Re: Greeting still being sent?
Posted by:  Remy Lebeau (TeamB) (
Date: Mon, 27 Mar 2006

"Alan McFarlane" <alan.mcfarla…> wrote in message

> I'm using a custom greeting in a TCPCmdServer, which is being output
> in the OnConnect event, however the original greeting is still being sent.
> Why?

You probably did not disable the original Greeting at all.  You should not
be doing so in the OnConnect event (especially since you are not doing it
correctly anyway).  You should be disabling the Greeting at design-time

> I've looked into the source (IdCmdTCPServer.pas) and it appears to
> call my OnConnect event, then immediately checks ti see if the
> Greeting.ReplyExists (which it shouldn't given that I've disabled it!)

No, you are not.  You are disabling the Greeting for the
TIdContext.Connection, not for the TIdCmdTCPServer itself.  It is the
server's Greeting, not the Connection's, that gets sent after the OnConnect
event handler exits.



In response to

Greeting still being sent? posted by Alan McFarlane on Tue, 28 Mar 2006