mar71n Posted May 15, 2017 Report Posted May 15, 2017 I'm currently having competition in a little niche, and its all about beeing faster. For that reason I want to accept a tradeoffer asap after getting it. Here is my question: Is there anything that I can do to make manager.on('newOffer', function (offer) { //Just a function that has some logic, does pretty much just accept the offer as long as itemstogive.length ==0 accept(offer); }); faster? Or is this the fastest already. And how much delay is there between getting the offer, and this block of code realizing that a new offer came in? I can also post my full code if needed. Quote
SunriseM Posted May 15, 2017 Report Posted May 15, 2017 You can change the Poll Interval in the Manager constructor. pollInterval - Optional. The time, in milliseconds, between polls. If -1, timed polling is disabled. Minimum 1000, default 30000 (30 seconds). you can also add Polling data, but i think it only affects trade loads after you have received multiples offers Quote
mar71n Posted May 15, 2017 Author Report Posted May 15, 2017 You can change the Poll Interval in the Manager constructor. pollInterval - Optional. The time, in milliseconds, between polls. If -1, timed polling is disabled. Minimum 1000, default 30000 (30 seconds). you can also add Polling data, but i think it only affects trade loads after you have received multiples offersdo you have any experience with that? I bet that steam doesn't like if the interval is too low Quote
SunriseM Posted May 15, 2017 Report Posted May 15, 2017 No i don't have experience in it and Yeah you are probably going to get Error 429 if you set it too low. Quote
Dr. McKay Posted May 16, 2017 Report Posted May 16, 2017 The absolute fastest way to accept incoming trade offers is to pass a node-steam-user instance to steam-tradeoffer-manager. The Steam server will send real-time notifications of when offers are received, and newOffer will be emitted immediately after the offer's details are retrieved. Quote
Alex_Wells Posted May 16, 2017 Report Posted May 16, 2017 Write your own library, cutting off as much as you can. Two best things are:1) cut off this.update() at accept2) use async events Quote
Dr. McKay Posted May 17, 2017 Report Posted May 17, 2017 Write your own library, cutting off as much as you can. Two best things are:1) cut off this.update() at accept2) use async events https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOffer#acceptskipstateupdate-callback Async events would be pretty difficult, seeing as EventEmitter is synchronous. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.