Click or drag to resize

ServerBase Class

Base class for a server involved in server-client communication.
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.ComponentModelComponent
      GSF.CommunicationServerBase
        GSF.CommunicationTcpServer
        GSF.CommunicationTlsServer
        GSF.CommunicationUdpServer
        GSF.CommunicationZeroMQServer

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

The ServerBase type exposes the following members.

Constructors
 NameDescription
Protected methodServerBase Initializes a new instance of the server.
Protected methodServerBase(TransportProtocol, String) Initializes a new instance of the server.
Top
Properties
 NameDescription
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event.
(Inherited from Component)
Public propertyClientIDs Gets the IDs of clients connected to the server.
Public propertyConfigurationString Gets or sets the data required by the server to initialize.
Public propertyContainerGets the IContainer that contains the Component.
(Inherited from Component)
Public propertyCurrentState Gets the current ServerState.
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 server is currently enabled.
Protected propertyEventsGets the list of event handlers that are attached to this Component.
(Inherited from Component)
Protected propertyInitialized Gets a boolean value that indicates whether the server has been initialized.
Public propertyIsDisposed Gets a flag that indicates whether the object has been disposed.
Public propertyMaxClientConnections Gets or sets the maximum number of clients that can connect to the server.
Public propertyName Gets the unique identifier of the server.
Public propertyPersistSettings Gets or sets a boolean value that indicates whether the server settings are to be saved to the config file.
Protected propertyReadIndicies Gets current read indices for received data buffers incremented at each Read(Guid, Byte, Int32, Int32) call.
Public propertyReceiveBufferSize Gets or sets the size of the buffer used by the server for receiving data from the clients.
Public propertyRunTime Gets the Time for which the server has been running.
Public propertySendBufferSize Gets or sets the size of the buffer used by the server for sending data to the clients.
Public propertyServerID Gets the server's ID.
Public propertySettingsCategory Gets or sets the category under which the server 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 propertyStatus Gets the descriptive status of the server.
Public propertyTextEncoding Gets or sets the Encoding to be used for the text sent to the connected clients.
Public propertyTransportProtocol Gets the TransportProtocol used by the server for the transportation of data with the clients.
Top
Methods
 NameDescription
Public methodBeginInit Performs necessary operations before the server properties are initialized.
Public methodStatic memberCreate Create a communications server
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 methodDisconnectAll Disconnects all of the connected clients.
Public methodDisconnectOne When overridden in a derived class, disconnects a connected client.
Public methodDisposeReleases all resources used by the Component.
(Inherited from Component)
Protected methodDispose(Boolean) Releases the unmanaged resources used by the server and optionally releases the managed resources.
(Overrides ComponentDispose(Boolean))
Public methodEndInit Performs necessary operations after the server 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 server.
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Public methodIsClientConnected Determines whether the given client is currently connected to the server.
Public methodLoadSettings Loads saved server 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)
Public methodMulticast(Byte) Sends data to all of the connected clients synchronously.
Public methodMulticast(Object) Sends data to all of the connected clients synchronously.
Public methodMulticast(String) Sends data to all of the connected clients synchronously.
Public methodMulticast(Byte, Int32, Int32) Sends data to all of the connected clients synchronously.
Public methodMulticastAsync(Byte) Sends data to all of the connected clients asynchronously.
Public methodMulticastAsync(Object) Sends data to all of the connected clients asynchronously.
Public methodMulticastAsync(String) Sends data to all of the connected clients asynchronously.
Public methodMulticastAsync(Byte, Int32, Int32) Sends data to all of the connected clients asynchronously.
Protected methodOnClientConnected Raises the ClientConnected event.
Protected methodOnClientConnectingException Raises the ClientConnectingException event.
Protected methodOnClientDisconnected Raises the ClientDisconnected event.
Protected methodOnReceiveClientData Raises the ReceiveClientData event.
Protected methodOnReceiveClientDataComplete Raises the ReceiveClientDataComplete event.
Protected methodOnReceiveClientDataException Raises the ReceiveClientDataException event.
Protected methodOnSendClientDataComplete Raises the SendClientDataComplete event.
Protected methodOnSendClientDataException Raises the SendClientDataException event.
Protected methodOnSendClientDataStart Raises the SendClientDataStart event.
Protected methodOnServerStarted Raises the ServerStarted event.
Protected methodOnServerStopped Raises the ServerStopped 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.
Protected methodReStart Re-starts the server if currently running.
Public methodSaveSettings Saves server settings to the config file if the PersistSettings property is set to true.
Protected methodSendDataToAsync When overridden in a derived class, sends data to the specified client asynchronously.
Public methodSendTo(Guid, Byte) Sends data to the specified client synchronously.
Public methodSendTo(Guid, Object) Sends data to the specified client synchronously.
Public methodSendTo(Guid, String) Sends data to the specified client synchronously.
Public methodSendTo(Guid, Byte, Int32, Int32) Sends data to the specified client synchronously.
Public methodSendToAsync(Guid, Byte) Sends data to the specified client asynchronously.
Public methodSendToAsync(Guid, Object) Sends data to the specified client asynchronously.
Public methodSendToAsync(Guid, String) Sends data to the specified client asynchronously.
Public methodSendToAsync(Guid, Byte, Int32, Int32) Sends data to the specified client asynchronously.
Public methodStart When overridden in a derived class, starts the server.
Public methodStop When overridden in a derived class, stops the server.
Public methodToStringReturns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component)
Protected methodValidateConfigurationString When overridden in a derived class, validates the specified configurationString.
Top
Events
 NameDescription
Public eventClientConnected Occurs when a client connects to the server.
Public eventClientConnectingException Occurs when an exception is encountered while a client is connecting.
Public eventClientDisconnected Occurs when a client disconnects from the server.
Public eventDisposedOccurs when the component is disposed by a call to the Dispose method.
(Inherited from Component)
Public eventReceiveClientData Occurs when unprocessed data has been received from a client.
Public eventReceiveClientDataComplete Occurs when data received from a client has been processed and is ready for consumption.
Public eventReceiveClientDataException Occurs when an Exception is encountered when receiving data from a client.
Public eventSendClientDataComplete Occurs when data has been sent to a client.
Public eventSendClientDataException Occurs when an Exception is encountered when sending data to a client.
Public eventSendClientDataStart Occurs when data is being sent to a client.
Public eventServerStarted Occurs when the server is started.
Public eventServerStopped Occurs when the server is stopped.
Public eventUnhandledUserException Occurs when an Exception is encountered in a user-defined function via an event dispatch.
Top
Fields
 NameDescription
Public fieldStatic memberDefaultMaxClientConnections Specifies the default value for the MaxClientConnections 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