Moved into src folder

This commit is contained in:
Florian Rappl
2023-04-01 23:44:25 +02:00
parent 3470a70572
commit 2367035acd
357 changed files with 5 additions and 16 deletions

View File

@@ -0,0 +1,33 @@
namespace ElectronNET.API
{
internal static class BridgeConnector
{
private static SocketIoFacade _socket;
private static readonly object SyncRoot = new();
public static SocketIoFacade Socket
{
get
{
if (_socket == null)
{
lock (SyncRoot)
{
if (_socket == null)
{
string socketUrl = HybridSupport.IsElectronActive
? $"http://localhost:{BridgeSettings.SocketPort}"
: "http://localhost";
_socket = new SocketIoFacade(socketUrl);
_socket.Connect();
}
}
}
return _socket;
}
}
}
}