mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Fixes
This commit is contained in:
@@ -33,10 +33,20 @@ namespace VRCX
|
||||
client?.Send(ipcPacket);
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetIpcName()
|
||||
{
|
||||
var hash = 0;
|
||||
foreach (var c in Environment.UserName)
|
||||
{
|
||||
hash += c;
|
||||
}
|
||||
return $"vrcx-ipc-{hash}";
|
||||
}
|
||||
|
||||
public void CreateIPCServer()
|
||||
{
|
||||
var ipcServer = new NamedPipeServerStream("vrcx-ipc", PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
|
||||
var ipcServer = new NamedPipeServerStream(GetIpcName(), PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
|
||||
ipcServer.BeginWaitForConnection(DoAccept, ipcServer);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace VRCX
|
||||
private static void IPCToMain()
|
||||
{
|
||||
new IPCServer().CreateIPCServer();
|
||||
var ipcClient = new NamedPipeClientStream(".", "vrcx-ipc", PipeDirection.InOut);
|
||||
var ipcClient = new NamedPipeClientStream(".", IPCServer.GetIpcName(), PipeDirection.InOut);
|
||||
ipcClient.Connect();
|
||||
|
||||
if (ipcClient.IsConnected)
|
||||
|
||||
Reference in New Issue
Block a user