-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Client refactor #17
Conversation
- Broke out all RPC clients into interfaces for testability. - Renamed the internal client classes to make a bit more sense. - Stubbed out a possible refactor of LoginClient.SetServer that would eliminate some duplicate requests.
@WallyCZ, would love your opinion on how to refactor SetServer to be able to return the first set of data w/o needing a subsequent set of requests. |
Currently it seems that we don't need any SetServer method anymore, because it tries to simulate initial communication to server, but it's different anyway. Or at least it's implementation should be changed, communication starts with repeated single (not batched) GetPlayer until reply comes (delay between request is 0.5s). |
I didn't read all the code but |
Ok so we need it, but we have to change it :) |
|
- Got rid of the HttpClientExtensions by moving Interfaces and Enums to new files, and putting the other functions in PokemonClient where they belong. - Worked on new methods for generating batch requests. - Initial build-out of the new request queueing mechanism.
It's shaping up nice, well done. |
It seems that last version 0.35 started to send at init phase GetPlayer and CheckChallenge (new feature) parallel and also CheckChallenge is added to batches (so now its 5 + 1 message in batch). We need strong mechanismus which will allow to control flow messages to match with original client. |
- Implemented a pattern for each GameService to be responsible for clearing its own state. - Fixed a bug where the CancellationToken property was wrong. - Started messing with an Event pattern for batch responses.
This was supposed to be in the last commit.
- TODO: Add everywhere else.
Found a new way to do Unit Tests.
Trying to get Unit Tests to work, but they don't, because Microsoft.
NOTE: Still WIP.