mirror of https://github.com/ppy/osu
Bind legacy IPC on startup
This commit is contained in:
parent
5711c428ca
commit
f506cb35bc
|
@ -61,27 +61,6 @@ public static void Main(string[] args)
|
|||
|
||||
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 @@ public static void Main(string[] args)
|
|||
}
|
||||
}
|
||||
|
||||
if (host.IsPrimaryInstance)
|
||||
{
|
||||
var legacyIpc = new LegacyTcpIpcProvider();
|
||||
legacyIpc.MessageReceived += onLegacyIpcMessageReceived;
|
||||
legacyIpc.Bind();
|
||||
legacyIpc.StartAsync();
|
||||
}
|
||||
|
||||
if (tournamentClient)
|
||||
host.Run(new TournamentGame());
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue