This documentation is archived and is not being maintained.
Handshake Enumeration
Visual Studio 2010
Specifies the control protocol used in establishing a serial port communication for a SerialPort object.
Assembly: System (in System.dll)
| Member name | Description | |
|---|---|---|
| None | No control is used for the handshake. | |
| XOnXOff | The XON/XOFF software control protocol is used. The XOFF control is sent to stop the transmission of data. The XON control is sent to resume the transmission. These software controls are used instead of Request to Send (RTS) and Clear to Send (CTS) hardware controls. | |
| RequestToSend | Request-to-Send (RTS) hardware flow control is used. RTS signals that data is available for transmission. If the input buffer becomes full, the RTS line will be set to false. The RTS line will be set to true when more room becomes available in the input buffer. | |
| RequestToSendXOnXOff | Both the Request-to-Send (RTS) hardware control and the XON/XOFF software controls are used. |
The following code example displays the possible values of the Handshake enumeration to the console, then prompts the user to choose one. This code example is part of a larger code example provided for the SerialPort class.
static Handshake SetPortHandshake(Handshake defaultPortHandshake) { String^ handshake; Console::WriteLine("Available Handshake options:"); for each (String^ s in Enum::GetNames(Handshake::typeid)) { Console::WriteLine(" {0}", s); } Console::Write("Handshake({0}):", defaultPortHandshake.ToString()); handshake = Console::ReadLine(); if (handshake == "") { handshake = defaultPortHandshake.ToString(); } return (Handshake)Enum::Parse(Handshake::typeid, handshake); }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: