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




Encapsulates a Telnet option.

Object Model

Option Class

Syntax

Visual Basic (Declaration) 
Public Class Option 
Visual Basic (Usage)Copy Code
Dim instance As Option
C# 
public class Option 
Managed Extensions for C++ 
public __gc class Option 
C++/CLI 
public ref class Option 

Remarks

The Telnet protocol allows for option negotiation to provide advanced capabilities to the default NVT (Network Virtual Terminal). Both client and server can request to enable or disable options. Both hosts can accept or deny requests as well. The Option object represents an option.

To add a Telnet option, create a new Option object, and add it to the ClientOptions or ServerOptions collection. Adding the Option to Telnet.ClientOptions causes the Telnet component to send a WILL or WONT command to the server concerning the option. Adding the Option to Telnet.ServerOptions causes the Telnet component to sent a DO or DONT command to the server concerning the option. The State can either be set to OptionState.RequestOn (to use the option by requesting it), or OptionState.Allow (to use the option if the remote host requests it). To not use an option, either do not add it to a OptionCollection, or, if already present, remove it. After option negotiation occurs, check the State property to see if the option was negotiated successfully (OptionState.On) or negotiated unsuccessfully (OptionState.Off).

Inheritance Hierarchy

System.Object
   Dart.Emulation.Option

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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