Closed saskenuba closed 4 years ago
Just read through node-steam-totp
. Looks like most of the functionality is derived from http calls. If we don't want it to be blocking, then we could either do the work in a different thread, or make the calls asynchronously. Do you have a preference for which method you'd prefer?
If most of these helpers do http calls for functionality, then async might be best. Reading through the async book now.
I believe the best way would be to go single thread async. After reading through Steamkit's code I don't think going multithread would present benefits that are worth the effort, especially only for event listening and writing messages back on a single connection. We could change our mind if after a minimal viable product is deployed, that could log in and listen to a couple of messages, we noticed increased delay or something.
On steam-API
crate I added reqwest
as a dependency to handle HTTP requests, and also an API module that has a builder to make calls on api.steampowered.com easier, you check if it fits for your needs, or feel free to create something else.
Oh awesome, yeah I was just going to use reqwest for those, so I'll check the steampowered builder out.
And yeah, that sounds good. I'll start implementing it with Futures then.
Solved by #4.
missmerge, reopening.
We can find in here a reference implementation in node.js of how the 2FA Codes are generated, but how should we deal with the API call? Ideally it should be in a non blocking way. What do you think?