Click or drag to resize

ClientBase Class

Base class for a client involved in server-client communication.
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.ComponentModelComponent
      GSF.CommunicationClientBase
        More

Namespace: GSF.Communication
Assembly: GSF.Communication (in GSF.Communication.dll) Version: 2.4.181-beta
Syntax
View Source

The ClientBase type exposes the following members.

Constructors
 NameDescription
Protected methodClientBase Initializes a new instance of the client.
Protected methodClientBase(TransportProtocol, String) Initializes a new instance of the client.
Top
Properties
 NameDescription
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event.
(Inherited from Component)
Public propertyConnectionString Gets or sets the data required by the client to connect to the server.
Public propertyConnectionTime Gets the Time for which the client has been connected to the server.
Public propertyContainerGets the IContainer that contains the Component.
(Inherited from Component)
Public propertyCurrentState Gets the current ClientState.
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode.
(Inherited from Component)
Public propertyEnabled Gets or sets a boolean value that indicates whether the client is currently enabled.
Protected propertyEventsGets the list of event handlers that are attached to this Component.
(Inherited from Component)
Public propertyIsDisposed Gets a flag that indicates whether the object has been disposed.
Public propertyMaxConnectionAttempts Gets or sets the maximum number of times the client will attempt to connect to the server.
Public propertyName Gets the unique identifier of the client.
Public propertyPersistSettings Gets or sets a boolean value that indicates whether the client settings are to be saved to the config file.
Protected propertyReadIndex Gets or sets current read index for received data buffer incremented at each Read(Byte, Int32, Int32) call.
Public propertyReceiveBufferSize Gets or sets the size of the buffer used by the client for receiving data from the server.
Public propertySendBufferSize Gets or sets the size of the buffer used by the client for sending data to the server.
Public propertyServerIndex Gets the current server index, when multiple server end points are defined.
Public propertyServerUri Gets the server URI.
Public propertySettingsCategory Gets or sets the category under which the client settings are to be saved to the config file if the PersistSettings property is set to true.
Public propertySiteGets or sets the ISite of the Component.
(Inherited from Component)
Public propertyStatistics Gets the TransportStatistics for the client connection.
Public propertyStatus Gets the descriptive status of the client.
Public propertyTextEncoding Gets or sets the Encoding to be used for the text sent to the server.
Protected propertyTrackStatistics Determines whether the base class should track statistics.
Public propertyTransportProtocol Gets the TransportProtocol used by the client for the transportation of data with the server.
Top
Methods
 NameDescription
Public methodBeginInit Performs necessary operations before the client properties are initialized.
Public methodConnect Connects the client to the server synchronously.
Public methodConnectAsync Connects the client to the server asynchronously.
Public methodStatic memberCreate Create a communications client
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject)
Public methodDisconnect When overridden in a derived class, disconnects client from the server synchronously.
Public methodDisposeReleases all resources used by the Component.
(Inherited from Component)
Protected methodDispose(Boolean) Releases the unmanaged resources used by the client and optionally releases the managed resources.
(Overrides ComponentDispose(Boolean))
Public methodEndInit Performs necessary operations after the client properties are initialized.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeReleases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.
(Inherited from Component)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Protected methodGetServiceReturns an object that represents a service provided by the Component or by its Container.
(Inherited from Component)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInitialize Initializes the client.
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Public methodLoadSettings Loads saved client settings from the config file if the PersistSettings property is set to true.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject)
Protected methodOnConnectionAttempt Raises the ConnectionAttempt event.
Protected methodOnConnectionEstablished Raises the ConnectionEstablished event.
Protected methodOnConnectionException Raises the ConnectionException event.
Protected methodOnConnectionTerminated Raises the ConnectionTerminated event.
Protected methodOnReceiveData Raises the ReceiveData event.
Protected methodOnReceiveDataComplete Raises the ReceiveDataComplete event.
Protected methodOnReceiveDataException Raises the ReceiveDataException event.
Protected methodOnSendDataComplete Raises the SendDataComplete event.
Protected methodOnSendDataException Raises the SendDataException event.
Protected methodOnSendDataStart Raises the SendDataStart event.
Protected methodOnUnhandledUserException Raises the UnhandledUserException event.
Public methodRead When overridden in a derived class, reads a number of bytes from the current received data buffer and writes those bytes into a byte array at the specified offset.
Public methodRequestNextServerIndex Requests that the client attempt to move to the next ServerIndex.
Public methodSaveSettings Saves client settings to the config file if the PersistSettings property is set to true.
Public methodSend(Byte) Sends data to the server synchronously.
Public methodSend(Object) Sends data to the server synchronously.
Public methodSend(String) Sends data to the server synchronously.
Public methodSend(Byte, Int32, Int32) Sends data to the server synchronously.
Public methodSendAsync(Byte) Sends data to the server asynchronously.
Public methodSendAsync(Object) Sends data to the server asynchronously.
Public methodSendAsync(String) Sends data to the server asynchronously.
Public methodSendAsync(Byte, Int32, Int32) Sends data to the server asynchronously.
Protected methodSendDataAsync When overridden in a derived class, sends data to the server asynchronously.
Public methodToStringReturns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component)
Protected methodUpdateBytesReceived Updates the Statistics pertaining to bytes received.
Protected methodUpdateBytesSent Updates the Statistics pertaining to bytes sent.
Protected methodValidateConnectionString When overridden in a derived class, validates the specified connectionString.
Top
Events
 NameDescription
Public eventConnectionAttempt Occurs when client is attempting connection to the server.
Public eventConnectionEstablished Occurs when client connection to the server is established.
Public eventConnectionException Occurs when an Exception is encountered during connection attempt to the server.
Public eventConnectionTerminated Occurs when client connection to the server is terminated.
Public eventDisposedOccurs when the component is disposed by a call to the Dispose method.
(Inherited from Component)
Public eventReceiveData Occurs when unprocessed data has been received from the server.
Public eventReceiveDataComplete Occurs when data received from the server has been processed and is ready for consumption.
Public eventReceiveDataException Occurs when an Exception is encountered when receiving data from the server.
Public eventSendDataComplete Occurs when the client has successfully sent data to the server.
Public eventSendDataException Occurs when an Exception is encountered when sending data to the server.
Public eventSendDataStart Occurs when the client begins sending data to the server.
Public eventUnhandledUserException Occurs when an Exception is encountered in a user-defined function via an event dispatch.
Top
Fields
 NameDescription
Public fieldStatic memberDefaultMaxConnectionAttempts Specifies the default value for the MaxConnectionAttempts property.
Public fieldStatic memberDefaultPersistSettings Specifies the default value for the PersistSettings property.
Public fieldStatic memberDefaultReceiveBufferSize Specifies the default value for the ReceiveBufferSize property.
Public fieldStatic memberDefaultSendBufferSize Specifies the default value for the SendBufferSize property.
Public fieldStatic memberDefaultSettingsCategory Specifies the default value for the SettingsCategory property.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
See Also
Inheritance Hierarchy