public DownloadEngine(NetworkEngine.Client _client, int _port = -1, string _token = "")
        {
            client = _client;

            port = _port;

            token = _token;


            user = StoreServer.FindUserByToken(token);

            client.dataReceivedFunction = DataReceived;
        }
        private UserAcceptStates AcceptUser(string token)
        {
            StoreServer.User user = StoreServer.FindUserByToken(token);
            if (user != null)
            {
                return(UserAcceptStates.accepted);
            }
            else
            {
                return(UserAcceptStates.badToken);
            }


            return(UserAcceptStates.unknown);
        }