seishun / node-steam

Interface directly with Steam servers from Node.js
MIT License
1k stars 180 forks source link

Under what conditions the "servers" event is triggered? #474

Closed dmetree01 closed 4 years ago

dmetree01 commented 4 years ago

Please indicate in the readme that the "servers" event is triggered after successful execution of the "logOn" method. this information would have saved me time.

seishun commented 4 years ago

What were you doing that the specific timing of the 'servers' event made a difference?

dmetree01 commented 4 years ago

I just needed a list of active steam server addresses. I expected this event to fire immediately after the "connected" event. In any case, I ended up with this list, only it was a bit non-obvious. Thanks :)

seishun commented 4 years ago

It's emitted when Steam sends you a server list. That seems to happen upon logging in, but it could change. Either way you shouldn't rely on this event to be emitted at all.