Class DeviceConnectionOptions
- Namespace
- KasaTapoClient
- Assembly
- KasaTapoClient.dll
Represents transport-specific connection options.
public sealed class DeviceConnectionOptions
- Inheritance
-
DeviceConnectionOptions
- Inherited Members
Constructors
DeviceConnectionOptions(DeviceTransportKind, DeviceConnectionParameters?, bool, bool, DefaultCredentialProfile, string, bool, TimeSpan?)
Initializes a new instance of the DeviceConnectionOptions class.
public DeviceConnectionOptions(DeviceTransportKind transportKind = DeviceTransportKind.Auto, DeviceConnectionParameters? connectionParameters = null, bool useSsl = false, bool useDefaultCredentials = false, DefaultCredentialProfile defaultCredentialProfile = DefaultCredentialProfile.None, string applicationPath = "/app", bool useSecurePassthrough = true, TimeSpan? tpapKeepAliveInterval = null)
Parameters
transportKindDeviceTransportKindThe transport to use when communicating with the device.
connectionParametersDeviceConnectionParametersThe parsed protocol family and encryption metadata, when known.
useSslboolA value indicating whether HTTPS should be used for HTTP token transport.
useDefaultCredentialsboolA value indicating whether a known default credential profile should be used when explicit credentials are not supplied.
defaultCredentialProfileDefaultCredentialProfileThe default credential profile to use when
useDefaultCredentialsis enabled.applicationPathstringThe application API path for HTTP token transport.
useSecurePassthroughboolA value indicating whether the HTTP transport should wrap device requests in the secure passthrough envelope when supported.
tpapKeepAliveIntervalTimeSpan?The optional TPAP keepalive interval. null uses the transport default, and Zero disables TPAP keepalive.
Exceptions
- ArgumentException
Thrown when
applicationPathis empty or whitespace.
Properties
ApplicationPath
Gets the application API path.
public string ApplicationPath { get; }
Property Value
ConnectionParameters
Gets the parsed connection parameters, when known.
public DeviceConnectionParameters? ConnectionParameters { get; }
Property Value
DefaultCredentialProfile
Gets the default credential profile.
public DefaultCredentialProfile DefaultCredentialProfile { get; }
Property Value
TpapKeepAliveInterval
Gets the optional TPAP keepalive interval.
public TimeSpan? TpapKeepAliveInterval { get; }
Property Value
TransportKind
Gets the transport kind.
public DeviceTransportKind TransportKind { get; }
Property Value
UseDefaultCredentials
Gets a value indicating whether a known default credential profile should be used.
public bool UseDefaultCredentials { get; }
Property Value
UseSecurePassthrough
Gets a value indicating whether the HTTP transport should use secure passthrough wrapping when available.
public bool UseSecurePassthrough { get; }
Property Value
UseSsl
Gets a value indicating whether HTTPS should be used for HTTP token transport.
public bool UseSsl { get; }