Exemplo n.º 1
0
 public Server(string filename)
 {
     _servers = new List<ServerMetadata>();
     ReadConfigurationFile(filename);
     action = new ServerAction(this._username);
     lookup = new ServerLookup(this._username, action, _servers);
     facade = new ServerFacade(this._username, _port, action, lookup, _servers);
 }
Exemplo n.º 2
0
 public Server(string filename)
 {
     _servers = new List <ServerMetadata>();
     ReadConfigurationFile(filename);
     action = new ServerAction(this._username);
     lookup = new ServerLookup(this._username, action, _servers);
     facade = new ServerFacade(this._username, _port, action, lookup, _servers);
 }
Exemplo n.º 3
0
 public Server(string username, int port, string path, string configFile)
 {
     _username = username;
     _port = port;
     _path = path;
     _configFile = _path + configFile;
     _servers = new List<ServerMetadata>();
     ReadConfigurationFile();
     action = new ServerAction(_username);
     lookup = new ServerLookup(this._username, action, _servers);
     facade = new ServerFacade(this._username, _port,  action, lookup, _servers);
 }
Exemplo n.º 4
0
 public Server(string username, int port, string path, string configFile)
 {
     _username   = username;
     _port       = port;
     _path       = path;
     _configFile = _path + configFile;
     _servers    = new List <ServerMetadata>();
     ReadConfigurationFile();
     action = new ServerAction(_username);
     lookup = new ServerLookup(this._username, action, _servers);
     facade = new ServerFacade(this._username, _port, action, lookup, _servers);
 }
Exemplo n.º 5
0
        static void Main(string[] args)
        {
            ClientFacade clientFacade = new ClientFacade();

            ServerFacade serverFacade = new ServerFacade(clientFacade);

            IServerController serverController = new ServerController(serverFacade);

            IServer server = new ServerSocket(serverController);

            serverFacade.Init(serverController);
            clientFacade.Init(serverController);

            Task.Run(() => server.Start());

            while (Console.ReadLine().ToLower() != "stop")
            {
                ;
            }
        }