コード例 #1
0
 public void Start(int port)
 {
     Base.ClientServer.OnChildProcessLogAdded += this.logManager.ChildProcessLogAdded;
     this.logManager.OnAddLIstenGroup         += delegate(object s, ListenerGroupEventArgs e)
     {
         Base.ClientServer.SendMessage <ChildProcessLogConnectMessage>(e.ClientID, new ChildProcessLogConnectMessage(e.ClientID, e.ProcessName, e.PID));
     };
     this.logManager.OnDeleteLIstenGroup += delegate(object s, ListenerGroupEventArgs e)
     {
         Base.ClientServer.SendMessage <ChildProcessLogDisconnectMessage>(e.ClientID, new ChildProcessLogDisconnectMessage(e.ClientID, e.ProcessName, e.PID));
     };
     this.logManager.OnChildProcessLogAdded += delegate(object s, ChildProcessLogEventArgs e)
     {
         RCClient rcclient = s as RCClient;
         e.Message.ClientID = rcclient.ID;
         foreach (int userID in e.Clients)
         {
             Base.ControlServer.SendToUser <ChildProcessLogMessage>(userID, e.Message);
         }
     };
     this.jobProcessor.Start();
     this.tcpServer.Start(this.jobProcessor, port);
     FileWatcher.Start();
     FileDistributor.Start();
 }
コード例 #2
0
ファイル: FileWatcher.cs プロジェクト: ulkyome/laucher_server
        public static void Resume()
        {
            if (FileWatcher._pause && FileWatcher._exit)
            {
                Log <RCServerService> .Logger.Info("FileWatcher >> Resume watching files...");

                FileWatcher.Start();
            }
        }