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

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

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

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

optionOption to WONT

Definition at line 851 of file telnet.cxx.

References DO, DONT, and SendCommand().

Referenced by Read().

  PTelnetError << "OnWont " << GetTELNETOptionName(code) << ' ';

  OptionInfo & opt = option[code];

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

    case OptionInfo::IsYes :
      PDebugError << "DONT.";
      opt.theirState = OptionInfo::IsNo;
      SendCommand(DONT, code);

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

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

    case OptionInfo::WantYes :
      PDebugError << "refused.";
      opt.theirState = OptionInfo::IsNo;

    case OptionInfo::WantYesQueued :
      PDebugError << "queued refusal.";
      opt.theirState = OptionInfo::IsNo;

  PDebugError << endl;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index