If the server sends an IAC WILL ECHO
to you, TIdTelnet
is hard-coded to send an IAC DO ECHO
response, and then triggers an OnTelnetCommand(tncNoLocalEcho)
event to tell you not to locally echo what you send.
If the server sends an IAC WONT ECHO
to you, TIdTelnet
is hard-coded to send an IAC DONT ECHO
response, and then triggers an OnTelnetCommand(tncLocalEcho)
event to tell you to locally echo what you send.
If the server sends an IAC DO ECHO
to you, TIdTelnet
is hard-coded to send an IAC WILL ECHO
response, and then triggers an OnTelnetCommand(tncEcho)
event to tell you to echo back whatever you receive.
If the server sends an IAC DONT ECHO
to you, TIdTelnet
is hard-coded to send an IAC WONT ECHO
response, and then triggers an OnTelnetCommand(tncLocalEcho)
event to tell you to echo back whatever you receive.
So, if you don't want the server to echo back to you, you can send an IAC DONT ECHO
command to the server, not an IAC DO SUPLOCALECHO
command. The server will then reply with either IAC WONT ECHO
or IAC WILL ECHO
accordingly (which apparently TIdTelnet
will then reply to, but the server will not respond back again since its ECHO
current state does not change, avoiding an endless response loop).