Example #1
0
void TelnetProtocol::SendSubNegotiation(int option, const BYTE_vector &params)
{
  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));
}
Example #2
0
void TelnetProtocol::SendSubNegotiation(BYTE option, const BYTE_vector &params)
{
  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;
}