I'm working on a MUD client and so far it's fun and works expect for what I think are Telnet Command codes that I am trying to ignore (I dont need to reply/respond)
In the text that comes to me it shows up like this: ÿü
But when I use wireshark, the bytes are :ff:fb:01
So I've been trying to do this:
std::string TELNETESC = "\0xFF\0xFB\0x01";
std::string str = "thedatathatcamefroma_TCPSocketÿü"
size_t pos = str.find(TELNETESC, 0);
while (pos != std::string::npos)
{
str.replace(pos, TELNETESC.length(), "");
pos = str.find(TELNETESC, pos + 1);
}
std::string TELNETESC = "\0xFF\0xFB\0x01";
std::string str = "thedatathatcamefroma_TCPSocketÿü"
size_t pos = str.find(TELNETESC, 0);
while (pos != std::string::npos)
{
str.replace(pos, TELNETESC.length(), "");
pos = str.find(TELNETESC, pos + 1);
}
To copy to clipboard, switch view to plain text mode
Though that doesn't seem to get rid of the characters.
Any ideas?
Bookmarks