Пример #1
0
        public ServerObject()
        {
            this.listener = new TcpListener(IPAddress.Any, port);
            this.dictionaryConnectedClients = new Dictionary <string, ConnectedClient>();
            this.packageCreator             = new PackageCreator();
            this.dataBase = new WrappedFirebase();

            //this.LoadMessageHistory();
        }
Пример #2
0
        public ClientObject(string id)
        {
            Id             = id;
            packageCreator = new PackageCreator();

            dataBase = new WrappedFirebase();
            var response = dataBase.GetUser(this.Id);

            if (response == null)
            {
                user = new User(id, "123", id);
                dataBase.SetUser(user);
            }
            user = response;
        }