+ case MODE_SUBNEG_OPTION:
+ _SysDebug("Option %i subnegotation", buf[i]);
+ Client->Mode = MODE_SUBNEG_DATA;
+ break;
+ case MODE_SUBNEG_IAC:
+ switch(buf[i])
+ {
+ case 240: // End subnegotation
+ // TODO: Handle subnegotation data
+ Client->Mode = MODE_DATA;
+ break;
+ case 255:
+ // TODO: Literal 255
+ Client->Mode = MODE_SUBNEG_DATA;
+ break;
+ default:
+ _SysDebug("Unexpected %i in SUBNEG IAC", buf[i]);
+ Client->Mode = MODE_SUBNEG_DATA;
+ break;
+ }
+ case MODE_SUBNEG_DATA:
+ if( buf[i] == 255 )
+ Client->Mode = MODE_SUBNEG_IAC;
+ else
+ ;//_SysWrite(Client->pty, buf+i, 1);
+ break;
+