Click or drag to resize

Client Class

Abstract client component, the base for all other clients.
Inheritance Hierarchy
SystemObject
  Crestron.SimplSharp.NetClient
    Crestron.SimplSharp.Net.HttpHttpClient

Namespace: Crestron.SimplSharp.Net
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public abstract class Client : IDisposable

The Client type exposes the following members.

Constructors
 NameDescription
Protected methodClient Client default constructor. Sets Binding and DNS resolve type.
Top
Properties
 NameDescription
Public propertyBindingObsolete.
Obsolete - Please use BindingV4 and BindingV6 instead.
Public propertyBindingV4 Gets the binding which provides properties and methods such as address family, IPv4 address, port number etc for client to connect to the host network.
Public propertyBindingV6 Gets the binding which provides properties and methods such as address family, IPv6 address, port number etc for client to connect to the host network.
Public propertyConnectionClass Use the ConnectionClass property to specify an alternative Connection class to be used for out coming data connections. Existing connections are not affected by changing the property.
Protected propertyConnectionPool Get or set the Connection Pool for this Client Instance.
Public propertyDnsResolveType Determines if the specified HostName should be looked up only: Once per application run (if you establish multiple connections to the server, the subsequent connections will use the cached IPAddress) or Always, for each connect (the Hostname will be resolved again for each subsequent connect). You'll usually only change this setting off the default (Once) if you anticipate the IPAddress of the target host to change frequently.
Public propertyEnableNagle Set the property value to true to enable the Nagle algorithm for send coalescing.
Public propertyHostAddress Gets or sets a Client Host IP Address as a string.
Public propertyHostName The server host name or IP address that you intend the client to connect to.
Public propertyPort The server Port that you intend the client to connect to.
Remarks
If you do not assign a port number on this property, the port number in the parsed URL will be used.
Remarks
If a port number is assigned in the parsed URL, it will take precedence over this property.
Top
Methods
 NameDescription
Public methodConnect Connect the client to a remote network host.
Public methodConnect(String, Int32) Connect to the host address at the specified port.
Public methodStatic memberConnect(String, Int32, Binding) Overloaded. Use to connect the client to a remote network host using the specified host name (HostName) or IP address (HostAddress) and port number (Port) and/or Binding (BindingV4 or BindingV6).
Public methodConnectNew Overloaded. Opens and returns new connection with specified host and port.
Public methodDispose Disposes the Client Connection.
Protected methodDispose(Boolean) Disposes of the current instance and releases all resources used by it.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodNewConnection Creates a New Client Connection with the specified binding.
Protected methodReleaseConnection Releases the Connection for the specified connection in the Connection Pool.
Protected methodResolveHostName Resolves the host name.
Protected methodResolveHostNameIfNeeded Determines whether it is necessary to resolve the host name based on the Host Address and DNS resolve type, and then resolves the host name accordingly.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Protected methodTriggerOnResolvedHostName Trigger the OnResolvedHostName.
Protected methodTriggerOnResolveHostName Triggers the Resolve
Top
Events
 NameDescription
Public eventOnResolvedHostName This event is fired after the hostname has been successfully resolved.
Public eventOnResolveHostName This event is fired before the Client attempts to resolve the specified HostName to an IP address. It provides you with an option to perform the resolution yourself, obtain the IP address from an internal cache you're maintaining, or do some other processing (such as for example changing the hostname to look up).
Top

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also