Example #1
0
 public DBHelper(string path)
 {
     SocketSettings.SocketSettings settings = new SocketSettings.SocketSettings(path);
     delay        = settings.MlsOfDelay;
     client       = new Client(settings);
     lastSettings = settings;
 }
Example #2
0
 public ClientSettings(
     ISocketSettings socketSettings,
     ISessionSettings sessionSettings,
     int httpRequestTimeout)
 {
     _socketSettings = socketSettings;
     _sessionSettings = sessionSettings;
     _httpRequestTimeout = httpRequestTimeout;
 }
Example #3
0
        public void LoadTest(string path, string ip, int port, int mls)
        {
            ISocketSettings settings = new SocketSettings(ip, port, mls);

            settings.Save(new MySaverSettings(path));

            ILoaderSettings loader         = new MyLoaderSettings(path);
            ISocketSettings loadedSettings = loader.Load();

            Assert.AreEqual(settings, loadedSettings);
        }
Example #4
0
 public Server(ICommands commands, ISocketSettings settings)
 {
     this.commands = commands;
     IsStarted     = false;
     logger        = new Logger.Logger();
     if (settings.ServerIP == "current")
     {
         this.settings = new SocketSettings.SocketSettings(getLocalIp(), settings.ServerPort, settings.MlsOfDelay);
     }
     else
     {
         this.settings = settings;
     }
 }
Example #5
0
 public DBHelper(ISocketSettings settings)
 {
     client       = new Client(settings);
     delay        = settings.MlsOfDelay;
     lastSettings = settings;
 }
 public ICanSpecifyParser WithSocketType <T>(ISocketSettings <T> settings) where T : class, ISocket
 {
     _collection.AddSingleton <ISocket, T>();
     _collection.Add(new ServiceDescriptor(settings.GetType(), settings));
     return(new CanSpecifyParser(_collection));
 }
Example #7
0
 public ServerProgram(ISocketSettings settings)
 {
     commands  = new ServerCommands();
     server    = new Server(commands, settings);
     mlsToStop = settings.MlsOfDelay;
 }
Example #8
0
 public ClientSettings(ISocketSettings socketSettings,
                       ISessionSettings sessionSettings)
     : this(socketSettings, sessionSettings, 60000)
 {
 }
Example #9
0
 public SocketWrapper(ISocketSettings settings)
 {
     _settings = settings;
 }