Client Class |
public abstract class Client : IDisposable
The Client type exposes the following members.
| Name | Description | |
|---|---|---|
| Binding | Obsolete. Obsolete - Please use BindingV4 and BindingV6 instead. | |
| BindingV4 | 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. | |
| BindingV6 | 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. | |
| ConnectionClass | 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. | |
| ConnectionPool | Get or set the Connection Pool for this Client Instance. | |
| DnsResolveType | 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. | |
| EnableNagle | Set the property value to true to enable the Nagle algorithm for send coalescing. | |
| HostAddress | Gets or sets a Client Host IP Address as a string. | |
| HostName | The server host name or IP address that you intend the client to connect to. | |
| Port |
The server Port that you intend the client to connect to.
If you do not assign a port number on this property, the port number in the parsed URL will be used. If a port number is assigned in the parsed URL, it will take precedence over this property. |
| Name | Description | |
|---|---|---|
| Connect | Connect the client to a remote network host. | |
| Connect(String, Int32) | Connect to the host address at the specified port. | |
| Connect(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). | |
| ConnectNew | Overloaded. Opens and returns new connection with specified host and port. | |
| Dispose | Disposes the Client Connection. | |
| Dispose(Boolean) | Disposes of the current instance and releases all resources used by it. | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| NewConnection | Creates a New Client Connection with the specified binding. | |
| ReleaseConnection | Releases the Connection for the specified connection in the Connection Pool. | |
| ResolveHostName | Resolves the host name. | |
| ResolveHostNameIfNeeded | 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. | |
| ToString | Returns a string that represents the current object. (Inherited from Object) | |
| TriggerOnResolvedHostName | Trigger the OnResolvedHostName. | |
| TriggerOnResolveHostName | Triggers the Resolve |
| Name | Description | |
|---|---|---|
| OnResolvedHostName | This event is fired after the hostname has been successfully resolved. | |
| OnResolveHostName | 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). |