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; } }
private void OnConnected(NamedPipeConnection <string, string> connection) { SendCommand(Commands.Heartbeat, _processName); }
private void OnDisconnected(NamedPipeConnection <string, string> connection) { }