 |
|
Elicia Server Client Model – Overview
Elicia Server Client Model provides the framework for
constructions of Server-Client based applications. In current version,
it provides TCP/IP and Named Pipes Servers. By using the Elicia Server Client model,
programmers only need to implement the logics of operations of the Servers and
the Clients. All the detail implementations about the connections to servers,
connection managements, server setup and other low level operations of
communications (e.g. reading and writing or data) are done by Elicia.
Moreover, programmers only need implement a single set of server and client code
and the code can be applied into both TCP/IP server and Named Pipes Servers
without any modification.
|
 |
| Class List |
|
|
Server Manager:
It is the object that you can create different
types of Server objects. |
|
|
IServer interface:
It is an interface of a Server object. That is,
it represents a Server. It is created by the Server Manager object. |
|
|
IServerSinkCreator interface:
It is an interface of the Server Sink Creator. As its name shows,
it creates the so-called Server Sink objects. Programmers should implement
the Server Sink Creator objects and put them into the Server object for
the operations of the Server. Server Sink Creator objects should create
the Server Sink objects according to the specified Service ID. |
|
|
IServerSink interface:
It is an interface of the Server Sink objects. A base class for
the Server Sink objects is provided in Elicia Server Client Model class library.
Programmers should implement their own Server Sink objects by deriving from
this base class. The derived Server Sink objects can then handle the commands from
the connected Client in the ‘OnClientCommand’ virtual function. Hence, the actual
logic of the server is in fact implemented in the Server Sink objects.. |
|
|
IServerConnection interface:
It is an interface of the Server Connection objects. The Server
Connection objects provide the functionalities for the applications to send or
receive data to or from the Clients. It can also wait the commands from the Clients,
notifies the Clients about the state of the Server etc. However, in general situations,
programmers don’t need to use the Server Connection objects directly, since the base
class of the Server Sink objects has already provide such functions to the applications. |
|
|
Client Manager:
It is the object that you can create different types of Client objects. |
|
|
IClient interface:
It is the interface of a Client object. That is, it represents a Client.
It is created by the Client Manager. The Client objects provide the function for
the applications to connect to the Server. |
|
|
IClientConnection interface:
It is the interface of the Client Connection objects. The Client Connection
objects provide the functionalities for the applications to communicate with the Server.
It can be used to send commands to the Server, send or receive data to or from the Server etc. |
|
|
IClientSink interface:
It is the interface of the Client Sink objects. Client Sink objects
are implemented by the programmers to handle the Server Notifications and Server
State Changes. The Client Sink object is optional. If it is implemented, it should be
set into the Client Connection objects for it to operate. |
|