
Calling the method
SwitchBacklight
switches on and off the back-
ground lighting on the client (
backlightOnOff
= 1 /
backlightOnOff
= 0).
●
int CKVCConnection::WriteToFlash()
;
Calling the method
WriteToFlash
saves the contents of the Client Win-
dows Registry in the flash memory.
●
int CKVCConnection::PlaySound(UINT16 soundNr);
Calling the method
PlaySound
starts the reproduction of the sound with
the number transferred in
soundNr
.
●
sockaddr_in GetSocketAdr();
The method
GetSocketAdr
returns the features of the connection.
●
SOCKET GetSocket();
The method
GetSocket
returns the current socket of the connection with
the client.
7.9.3.3
Server Implementation
The base of the server are the two classes
CKVCServer
and
CKVCConnec-
tion
. The class
CKVCServer
establishes and manages the connections. The
class
CKVCConnection
constitutes the actual connection.
To correctly implement a server, a derivation of the class
CKVCServer
is nee-
ded.
class CKVCTestServer: public CKVCServer{
public:
CKVCTestServer();
virtual ~CKVCTestServer();
CKVCConnection* OnClientConnect(SOCKET socket,
sockaddr_in &sockAdr);
int OnClientDisconnect(CKVCConnection *pConnection,
TKVCDisconInfo info);
};
In this class, the method
OnClientConnect
must be overwritten. In this
method, a
CKVCConnection
object must be created and initialized.
CKVCConnection* CKVCTestServer::OnClientConnect(SOCKET socket,
sockaddr_in &sockAdr){
CKVCTestConnection *pConnect = 0;
... pConnect = new CKVCTestConnection();
if (pConnect != 0){
pConnect->Init(this, socket, sockAdr);
}
...
return pConnect;
}
The method
OnClientDisconnect
can be overwritten. But it must be guar-
anteed that the method
CKVCServer::OnClientDisconnect
is called in
this derivation.
int CKVCTestServer::OnClientDisconnect(CKVCConnection
*pConnection,
TKVCDisconInfo info){
...
Software
© KEBA 2009
User's Manual V1.50
85
Summary of Contents for KeTop T100
Page 1: ...KEMRO KeTop T50VGA User s Manual V1 50 Translation of the original instructions ...
Page 4: ......
Page 10: ......