Telnet commands

Dec 31, 2013 at 12:40 AM
Edited Dec 31, 2013 at 12:42 AM

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.