1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Bind legacy IPC on startup

This commit is contained in:
Dan Balasescu 2021-11-28 21:15:29 +09:00
parent 5711c428ca
commit f506cb35bc

View File

@ -61,27 +61,6 @@ namespace osu.Desktop
gameName = $"{base_game_name}-{clientID}";
break;
case "--legacy-ipc-server":
using (legacyIpcProvider = new LegacyTcpIpcProvider())
{
legacyIpcProvider.MessageReceived += onLegacyIpcMessageReceived;
legacyIpcProvider.Bind();
legacyIpcProvider.StartAsync().Wait();
}
return;
case "--legacy-ipc-client":
using (legacyIpcProvider = new LegacyTcpIpcProvider())
{
Console.WriteLine(legacyIpcProvider.SendMessageWithResponseAsync<LegacyIpcDifficultyCalculationResponse>(new LegacyIpcDifficultyCalculationRequest
{
BeatmapFile = "/home/smgi/Downloads/osu_files/129891.osu",
}).Result.StarRating);
}
return;
}
}
@ -113,6 +92,14 @@ namespace osu.Desktop
}
}
if (host.IsPrimaryInstance)
{
var legacyIpc = new LegacyTcpIpcProvider();
legacyIpc.MessageReceived += onLegacyIpcMessageReceived;
legacyIpc.Bind();
legacyIpc.StartAsync();
}
if (tournamentClient)
host.Run(new TournamentGame());
else