Jump to content
McKay Development

charon

Member
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

charon's Achievements

  1. 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 message CMsgStoreGetUserDataResponse { optional int32 result = 1; optional int32 currency_deprecated = 2; optional string country_deprecated = 3; optional fixed32 price_sheet_version = 4; optional bytes price_sheet = 8; } the price_sheet property is bytes, any advice how to decrypt those bytes, or get the ProtoBuf for it?
  2. 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!
  3. 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.
  4. any update for this issue ? the' already logged' error could not be caughted now, and will cause a crash in the node process
  5. 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 example function 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 ?
×
×
  • Create New...