This commit is contained in:
JohnCorby 2023-06-09 22:50:09 -07:00
parent 5720d66a24
commit a86038020d
5 changed files with 9 additions and 9 deletions

View File

@ -8,7 +8,7 @@ namespace SteamRerouter.ExeSide;
/// <summary>
/// handles communication with the mod
/// </summary>
public static class Socket
public static class IpcClient
{
private static TcpClient _tcpClient;

View File

@ -52,9 +52,9 @@ public static class Program
return;
}
Socket.Connect(port);
IpcClient.Connect(port);
Socket.Loop();
IpcClient.Loop();
Log("stop");
SteamAPI.Shutdown();

View File

@ -19,7 +19,7 @@ public class Interop : MonoBehaviour
Log("awake");
Harmony.CreateAndPatchAll(typeof(Patches));
var port = Socket.Listen();
var port = IpcServer.Listen();
var processPath = Path.Combine(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!,
@ -46,14 +46,14 @@ public class Interop : MonoBehaviour
CreateNoWindow = false //true
});
Socket.Accept();
IpcServer.Accept();
}
private void OnDestroy()
{
Log("destroy");
Socket.Quit();
IpcServer.Quit();
_process.WaitForExit();
_process.Dispose();
}

View File

@ -7,7 +7,7 @@ namespace SteamRerouter.ModSide;
/// <summary>
/// handles communication with the exe
/// </summary>
public static class Socket
public static class IpcServer
{
private static TcpListener _listener;
private static TcpClient _tcpClient;

View File

@ -9,7 +9,7 @@ public static class Patches
[HarmonyPatch(typeof(SteamEntitlementRetriever), nameof(SteamEntitlementRetriever.GetOwnershipStatus))]
private static bool SteamEntitlementRetriever_GetOwnershipStatus(out EntitlementsManager.AsyncOwnershipStatus __result)
{
__result = Socket.SteamEntitlementRetriever_GetOwnershipStatus();
__result = IpcServer.SteamEntitlementRetriever_GetOwnershipStatus();
return false;
}
@ -17,7 +17,7 @@ public static class Patches
[HarmonyPatch(typeof(Achievements), nameof(Achievements.Earn))]
private static bool Achievements_Earn(Achievements.Type type)
{
Socket.Achievements_Earn(type);
IpcServer.Achievements_Earn(type);
return false;
}
}