-
Posts
5 -
Joined
-
Last visited
Posts posted by charon
-
-
10 minutes ago, Dr. McKay said:
There's no real limit on how many steam-user instances you can run in one process; your biggest limitations are going to be memory and IP addresses.
if all the instance are managed in one process, every time reboot the process all steam-user need to login again, it' a big affect!
-
The steam-user instance use tcp or websocket to keep alive to the steam server, it's stateful,
not like steamcommunity connection, the http connection is stateless, so we can cache the http cookies, and load cookies as we needed any time, no need to keep a steamcommunity instance.
but the steam-user use a alive connection, so we have to always keep a steam-user instance in memory, when there are a lot of steam-user instances, it's hard to manage them, how many steam-user instance show be managed in one node.js process and how to partition a lot of steam-users, it may be a large project.
any advice or experience about this ? thank you.
-
On 9/18/2020 at 3:30 PM, Dr. McKay said:
That's a good point on the already logged on error, although for the others I don't really think it's worth being concerned about. It should not be possible to be missing a CM list since it's retrieved from the WebAPI and the library falls back to a bundled list if that fails.
I'll see about making it possible to handle the already logged on error.
any update for this issue ?
the' already logged' error could not be caughted now, and will cause a crash in the node process -
SteamUser.prototype.logOn = function(details) { // Delay the actual logon by one tick, so if users call logOn from the error event they won't get a crash because // they appear to be already logged on (the steamID property is set to null only *after* the error event is emitted) process.nextTick(async () => { if (this.steamID) { throw new Error("Already logged on, cannot log on again"); } this.steamID = null; this.limitations = null; //.......... } }
after v4.5.1, the logOn method use the nextTick to do login action,
after then, how to get the Error in the nextTick async callback ?and so, the doConnection is called in the callback method, there are maybe some errors in that method,
for examplefunction TCPConnection(user) { this.user = user; // Pick a CM randomly if (!user._cmList || !user._cmList.tcp_servers) { throw new Error("Nothing to connect to: " + (user._cmList ? "no TCP server list" : "no CM list")); } let tcpCm = user._cmList.tcp_servers[Math.floor(Math.random() * user._cmList.tcp_servers.length)]; user.emit('debug', 'Connecting to TCP CM: ' + tcpCm); let cmParts = tcpCm.split(':'); let cmHost = cmParts[0]; let cmPort = parseInt(cmParts[1], 10); // ....... }
maybe some temporary network issues, and it may cause that, tcpCm is invalid, so
tcpCm.split(':');
may get error,
but those error could not be catched, it cause node.js unhandledRejectionException
how to catch those exception in the code ?
Any advice, how to decrypt steam client's binary data?
in node-steam-user
Posted
The steam-user module simulate the same protocol that like the steam client, and decrypt the messages from CM with the message id and ProtoBufs,
there are some sub properties in ProtoBuf defined as bytes, such as
the price_sheet property is bytes, any advice how to decrypt those bytes, or get the ProtoBuf for it?