The ProtocolStackServer class encapsulates access to the LayGO RPC server.
using LaygoApi;
try
{
ProtocolStackServer.Connect();
UseLaygoServerServices();
}
catch (ProtocolStackException ex)
{
LogException("Exception: " + ex.Message);
}
finally
{
ProtocolStackServer.Disconnect();
}