mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-08-13 19:49:36 +00:00
Create Electron-Class for API´s
This commit is contained in:
19
ElectronNET.API/BridgeConnector.cs
Normal file
19
ElectronNET.API/BridgeConnector.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Quobject.SocketIoClientDotNet.Client;
|
||||
using System;
|
||||
|
||||
namespace ElectronNET.API
|
||||
{
|
||||
internal static class BridgeConnector
|
||||
{
|
||||
public static Socket Socket;
|
||||
|
||||
public static void StartConnection()
|
||||
{
|
||||
Socket = IO.Socket("http://localhost:" + BridgeSettings.SocketPort);
|
||||
Socket.On(Socket.EVENT_CONNECT, () =>
|
||||
{
|
||||
Console.WriteLine("BridgeConnector connected!");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user