Hi
I'm also looking for someway of checking/validating the IP address
trying to connect to the Server before allowing a connection.

Regards

Brian

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rob Kennedy
Sent: Wednesday, 6 April 2005 3:08 PM
To: Borland's Delphi Discussion List
Subject: Re: TIdTelnetServer

Hunt, Brian wrote:
> I need to write a couple of program Telnet Client and Telnet Server. 
> 
> I have created both a Delphi Telnet Client and Telnet server using
Indy
> components. I know how to read in data sent to the Client by using the
> OnDataAvailable event and send data to the server by using the SendCh
> method but how do you send and receive data at the Telnet Server.
There
> is no method like the OnDataAvailable event?  

The telnet server is more structured than that. Remember that Indy uses 
*a lot* of inheritance in its design. TIdTelnetServer doesn't introduce 
much at all, but it inherits all sorts of methods and properties from 
TIdTCPServer. In particular, it has a CommandHandlers property, which 
you can use to define the commands you want to accept and the event 
handlers you want to run when you receive those commands. You can use 
the server's OnAfterCommandHandler and OnBeforeCommandHandler events to 
to general preparation and cleanup for commands. And you can use the 
OnNoCommandHandler event to take care of anything that the 
CommandHandlers collection doesn't recognize.

I suggest you test your server using an established telnet client, not 
the one you wrote yourself. That way, you can isolate errors in your 
server instead of working around them in your client.

-- 
Rob

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to