Telnet commands

Dec 30, 2013 at 11:40 PM
Edited Dec 30, 2013 at 11:42 PM

I've been looking at the sourcecode, and it seems you only treat WILL (251),WONT (252) ,DO (253),DONT (254) as commands. There are other commands defined as well like NOP (241), BRK(243), and if I understand your parser correctly, those will be handled by:

                            // This is unexpected.  Refer to the
                            // specs to determine what to do here.
                            // Possibly someone wrote a so-called Telnet
                            // client that just sends raw data over the
                            // connection (many VB programmers open a simple
                            // TCP stream and call it Telnet).

                            rxState = TelnetProtocolState.Data;

I don't think that treating those commands as data, is the correct approach. Shouldn't you just ignore those, or let the other party know you don't process them?

Happy xmas and happy 2014.