Handshake Enumeration
.NET Framework 2.0
Note: This enumeration is new in the .NET Framework version 2.0.
Specifies the control protocol used in establishing a serial port communication for a SerialPort object.
Namespace: System.IO.Ports
Assembly: System (in system.dll)
Assembly: System (in system.dll)
| Member name | Description | |
|---|---|---|
![]() | None | No control is used for the handshake. |
![]() | 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. |
![]() | 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. |
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.
Public Shared Function SetPortHandshake(ByVal defaultPortHandshake As Handshake) As Handshake Dim newHandshake As String Console.WriteLine("Available Handshake options:") Dim s As String For Each s In [Enum].GetNames(GetType(Handshake)) Console.WriteLine(" {0}", s) Next s Console.Write("Stop Bits({0}):", defaultPortHandshake.ToString()) newHandshake = Console.ReadLine() If newHandshake = "" Then newHandshake = defaultPortHandshake.ToString() End If Return CType([Enum].Parse(GetType(Handshake), newHandshake), Handshake) End Function
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show:
