Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

void PTelnetSocket::OnDont ( BYTE  option  )  [protected, virtual]

This callback function is called by the system when it receives a DONT request from the remote system.

The default action is to disable options that are understood by the standard TELNET class. All others are ignored.

Parameters:
option  Option to DONT

Definition at line 759 of file telnet.cxx.

References DO, SendCommand(), and WONT.

Referenced by Read().

{
  PTelnetError << "OnDont " << GetTELNETOptionName(code) << ' ';

  OptionInfo & opt = option[code];

  switch (opt.ourState) {
    case OptionInfo::IsNo :
      PDebugError << "ignored.";
      break;

    case OptionInfo::IsYes :
      PDebugError << "WONT.";
      opt.ourState = OptionInfo::IsNo;
      SendCommand(WONT, code);
      break;

    case OptionInfo::WantNo :
      PDebugError << "disabled.";
      opt.ourState = OptionInfo::IsNo;
      break;

    case OptionInfo::WantNoQueued :
      PDebugError << "accepting.";
      opt.ourState = OptionInfo::WantYes;
      SendCommand(DO, code);
      break;

    case OptionInfo::WantYes :
      PDebugError << "queued disable.";
      opt.ourState = OptionInfo::IsNo;
      break;

    case OptionInfo::WantYesQueued :
      PDebugError << "refused.";
      opt.ourState = OptionInfo::IsNo;
      break;
  }

  PDebugError << endl;
}


Generated by  Doxygen 1.6.0   Back to index