PowerTCP Emulation for .NET CF
State Property
See Also  Send comments on this topic.
Dart.Emulation Namespace > Option Class : State Property




Gets or sets the current state of the Option.

Syntax

Visual Basic (Declaration) 
Public Property State As OptionState
Visual Basic (Usage)Copy Code
Dim instance As Option
Dim value As OptionState
 
instance.State = value
 
value = instance.State
C# 
public OptionState State {get; set;}
Managed Extensions for C++ 
public: __property OptionState get_State();
public: __property void set_State( 
   OptionState value
);
C++/CLI 
public:
property OptionState State {
   OptionState get();
   void set (    OptionState value);
}

Property Value

An OptionState value representing the current state of the Option.

Remarks

Option negotiation with PowerTCP Telnet for .NET can be broken down into three general states:

State 1 - Setting the option:

Any requested options must be added to either the ClientOptions or ServerOptions collections. Any options added to these collections are part of the automatic option negotiation. When adding new options to the collection:

  • Set to OptionState.RequestOn to request the option (default value).
  • Set to OptionState.Allow to enable the option if the remote host requests it.
  • Remove Options from the collection to respond negatively to server requests.

State 2 - Requesting the option:

Option negotiation is typically handled internally by the Telnet component when a new connection occurs. During this time, Code is OptionCode.Waiting, indicating a request has been sent but a response has not yet been received.

State 3 - Negotiation complete:

After option negotiation has completed, check Option.Code to see the negotiation results. It should be one of two values:

  • OptionCode.Off if the option is not used.
  • OptionCode.On if the option is used.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.