コード例 #1
0
        private void OnServerMessage(NamedPipeConnection <string, string> connection, string message)
        {
            var args = message.Split(',');

            if (args.Length == 0)
            {
                return;
            }
            uint command; if (!uint.TryParse(args[0], out command))

            {
                return;
            }

            switch (command)
            {
            case (int)Commands.SetTimeOut:
                if (args.Length < 2)
                {
                    return;
                }
                uint timeout;
                if (uint.TryParse(args[1], out timeout))
                {
                    Timeout = timeout;
                }
                break;
            }
        }
コード例 #2
0
 private void OnConnected(NamedPipeConnection <string, string> connection)
 {
     SendCommand(Commands.Heartbeat, _processName);
 }
コード例 #3
0
 private void OnDisconnected(NamedPipeConnection <string, string> connection)
 {
 }