public async Task InitAsync(bool useLfg, bool enablePlayerMenu, bool enableProxy, bool showIngameChat, bool tccChatEnabled) { StubServer.RequestReceived += _messageParser.HandleRequest; StubServer.ResponseReceived += _messageParser.HandleResponse; if (!enableProxy) { return; } IsStubAvailable = await StubClient.PingStub(); if (!IsStubAvailable) { Log.F("Stub not found"); return; } StubClient.Initialize(useLfg, enablePlayerMenu, enableProxy, showIngameChat, tccChatEnabled); StubServer.Start(); IsFpsModAvailable = await StubClient.GetIsModAvailable("fps-utils") || await StubClient.GetIsModAvailable("fps-manager"); }
public async Task Init() { StubServer.RequestReceived += MessageHandler.HandleRequest; StubServer.ResponseReceived += MessageHandler.HandleResponse; if (!App.Settings.EnableProxy) { return; } IsStubAvailable = await StubClient.PingStub(); if (!IsStubAvailable) { Log.F("Stub not found"); return; } StubClient.Initialize(); StubServer.Start(); IsFpsModAvailable = await StubClient.GetIsModAvailable("fps-utils") || await StubClient.GetIsModAvailable("fps-manager"); }