Ok, I have found the answer. The problem was that I was sending it via a Streamwriter, which fargles the output. By converting to bytes and sending directly to the socket, it works as it should - e.g.
byte[] cmd = new byte[] { 0xFF, 0xFB, 0x01 };
this.socket.Sen d(cmd);
correctly disables local echo on the connecting telnet client - in case anyone in the future needs this info. :)
User Profile
Collapse
-
Yes. It turns off local echo on or off on the connecting telnet clients. The problem is that I cannot seem to get C# to encode the char sequence in the same way that VB6 did with the Chr() function.Leave a comment:
-
C# Telnet echo off/on
Hi guys,
I am rewriting an old telnet server of mine from VB6 to C#. I do not have access to VB6 any more, so I cannot (nor do I really want to) use VB6 references.
Everything is working well, except for one problem I am having with setting the local echo off or on (for password entry).
In VB6, I used to send
Chr(255) & Chr(251) & Chr(1)
to turn echo off, and
...
No activity results to display
Show More
Leave a comment: