private void RemoteCallHandler(PatcherIpcEnvelope envelope) { switch (envelope.OpCode) { case PatcherIpcOpCode.Hello: //_client.Initialize(_clientPort); Log.Information("[PATCHERIPC] GOT HELLO"); State = InstallerState.Ready; break; case PatcherIpcOpCode.InstallOk: Log.Information("[PATCHERIPC] INSTALL OK"); State = InstallerState.Ready; break; case PatcherIpcOpCode.InstallFailed: State = InstallerState.Failed; OnFail?.Invoke(); Stop(); Environment.Exit(0); break; default: throw new ArgumentOutOfRangeException(); } }
private void SendIpcMessage(PatcherIpcEnvelope envelope) { try { _client.Send(PatcherMain.Base64Encode(JsonConvert.SerializeObject(envelope, Formatting.Indented, XIVLauncher.PatchInstaller.PatcherMain.JsonSettings))); } catch (Exception e) { Log.Error(e, "[PATCHERIPC] Failed to send message."); } }
public void SendMessage(PatcherIpcEnvelope envelope) { var json = IpcHelpers.Base64Encode(JsonConvert.SerializeObject(envelope, IpcHelpers.JsonSettings)); this.rpcBuffer.RemoteRequest(Encoding.ASCII.GetBytes(json)); }