Re: Greeting still being sent?

Giganews Newsgroups
Subject: Re: Greeting still being sent?
Posted by:  Alan McFarlane (alan.mcfarla…@gmail.com)
Date: Tue, 28 Mar 2006

Thank you, that worked, albeit *only* by setting the Greeting.Code to ''
and calling Greeting.Text.Clear just prior to activating the server.

Setting the properties in the IDE did not work. Perhaps only the code or
the text has to be empty.

Anyway, it's working as I had hoped now.

Thanks again.

Remy Lebeau (TeamB) wrote:
> "Alan McFarlane" <alan.mcfarla…@gmail.com> wrote in message
> news:E644949C76F2E240alan.mcfarla…@gmail.com...
>
>> 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
> instead.
>
>> 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.
>
> Gambit

Replies

In response to

Re: Greeting still being sent? posted by Remy Lebeau (TeamB) on Mon, 27 Mar 2006