CProtocolServer#include "CProtocolServer.h"
The CProtocolServer class encapsulates access to the LayGO RPC Server.
There should be only one CProtocolServer object in existence at any time.
CProtocolServer simplifies server control into just 2 operations:
This results in the server initialization code shown below:
try
{
CProtocolServer server;
server.Connect();
Process()
server.Disconnect();
}
catch (CServerException & exception)
{
cout << "Failure connecting to LayGO RPC Server '"
<< exception.GetServerName()
<< "': "
<< exception.GetMessage()
<< "."
<< endl;
}