Ejemplo n.º 1
0
 private void OnProtocolClosed(object sender, ProtocolEventArgs e)
 {
     Console.WriteLine("Connection has " + e.Protocol.State);
     if (msgServer != null)
     {
         msgServer.SendMessageToMessageServer(97002, LogCategory.Alarm, LogLevel.Alarm, "Connection to Configuration Server has been lost!");
     }
 }
Ejemplo n.º 2
0
        private void SetUpMessageServer(string appName, int dbid, int lcaPort, string host, int port)
        {
            MessageServer = new MessageServer(appName, dbid, lcaPort, host, port);
            msgServer     = (MessageServer)MessageServer;
            // msgServer.SetStatus(GenesysCoreServers.MessageServer.ModeInitializing);
            msgServer.ConnectToMessageServer();
            int i = 1;

            while (!msgServer.IsConnectedToMessageServer() && i < 5)
            {
                Thread.Sleep(1000);
                i++;
            }
            msgServer.SendMessageToMessageServer(97000, LogCategory.Alarm, LogLevel.Info, "TPS Started");
            TpsLogManager <ConfigServer> .Debug("Message server has been started");
        }