public WebServerController(Model.Settings settings)
 {
     this._settings = settings;
     _listener = new TcpListener(IPAddress.Any, settings.WebServerPort);
     _helper = new JsonHelper();
     //Start();
 }
 public SocketServerController(string title, int limit)
 {
     try
     {
         _threadList = new List<Thread>();
         var ip = new IPEndPoint(IPAddress.Any, 8081);
         _server = new Socket(ip.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
         _server.Bind(ip);
         _server.Listen(MaxConnection);
         //--------------------------------------
         _settings           = _manager.Load();
         _database              = new SqLiteDatabase(_settings);
         _usedAccountArray   = new UsedAccountsController();
         _jsonHelper              = new JsonHelper();
         _myTitle            = title;
     }
     catch (Exception ex)
     {
         CreateSystemMessage("SocketError", "Ошибка 2.1: " + ex.Message);
     }
 }