Webserver: -mod: disable discover server (yet not implemented in clientapp)
This commit is contained in:
1 parent
e713afa8e2
commit
92012cf45e
1 file changed
+4
-8
@@ -37,15 +37,12 @@ namespace Vocaluxe.Base.Server
|
|||||||
static class CVocaluxeServer
|
static class CVocaluxeServer
|
||||||
{
|
{
|
||||||
private static CServer _Server;
|
private static CServer _Server;
|
||||||
private static CDiscover _Discover;
|
//private static CDiscover _Discover;
|
||||||
private static Dictionary<int, CClientHandler> _Clients;
|
|
||||||
|
|
||||||
public static readonly CControllerFramework Controller = new CControllerFramework();
|
public static readonly CControllerFramework Controller = new CControllerFramework();
|
||||||
|
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
_Clients = new Dictionary<int, CClientHandler>();
|
|
||||||
|
|
||||||
_Server = new CServer(CConfig.ServerPort, CConfig.ServerEncryption == EOffOn.TR_CONFIG_ON);
|
_Server = new CServer(CConfig.ServerPort, CConfig.ServerEncryption == EOffOn.TR_CONFIG_ON);
|
||||||
|
|
||||||
CServer.SendKeyEvent = _SendKeyEvent;
|
CServer.SendKeyEvent = _SendKeyEvent;
|
||||||
@@ -72,7 +69,7 @@ namespace Vocaluxe.Base.Server
|
|||||||
CServer.RemovePlaylist = _RemovePlaylist;
|
CServer.RemovePlaylist = _RemovePlaylist;
|
||||||
CServer.AddPlaylist = _AddPlaylist;
|
CServer.AddPlaylist = _AddPlaylist;
|
||||||
|
|
||||||
_Discover = new CDiscover(CConfig.ServerPort, CCommands.BroadcastKeyword);
|
//_Discover = new CDiscover(CConfig.ServerPort, CCommands.BroadcastKeyword);
|
||||||
Controller.Init();
|
Controller.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,15 +78,14 @@ namespace Vocaluxe.Base.Server
|
|||||||
if (CConfig.ServerActive == EOffOn.TR_CONFIG_ON)
|
if (CConfig.ServerActive == EOffOn.TR_CONFIG_ON)
|
||||||
{
|
{
|
||||||
_Server.Start();
|
_Server.Start();
|
||||||
_Discover.StartBroadcasting();
|
//_Discover.StartBroadcasting();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Close()
|
public static void Close()
|
||||||
{
|
{
|
||||||
_Server.Stop();
|
_Server.Stop();
|
||||||
_Discover.Stop();
|
//_Discover.Stop();
|
||||||
_Clients = new Dictionary<int, CClientHandler>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool _SendKeyEvent(string key)
|
private static bool _SendKeyEvent(string key)
|
||||||
|
|||||||
Reference in new issue
Block a user