void TelnetProtocol::SendSubNegotiation(int option, const BYTE_vector ¶ms) { SendOption(cdSB, (BYTE)option); printf(" "); for (BYTE_vector::const_iterator i = params.begin() ; i != params.end() ; i++) { BYTE b = *i; printf("%u ", (unsigned)b); SendRaw(&b, sizeof(b)); } printf("SE\n"); BYTE buf[2] = {cdIAC, cdSE}; SendRaw(buf, sizeof(buf)); }
void TelnetProtocol::SendSubNegotiation(BYTE option, const BYTE_vector ¶ms) { SendOption(cdSB, option); cout << " "; for (BYTE_vector::const_iterator i = params.begin() ; i != params.end() ; i++) { BYTE b = *i; cout << (unsigned)b << " "; streamEncoded += b; if (b == cdIAC) streamEncoded += b; } cout << "SE" << endl; streamEncoded += (BYTE)cdIAC; streamEncoded += (BYTE)cdSE; }