0.0.4 • Published 7 years ago

node-steam-game-coordinator v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

SteamGameCoordinator

This is a handler for game coordinator related functionality, to be used with the node-steam module. It is basically a straight copy of Seishun's module here.

Initialize it by passing a SteamClient instance and AppID to the constructor.

var Steam                = require('node-steam'),
    SteamGameCoordinator = require('node-steam-game-coordinator');

var client = new Steam.SteamClient();

Steam.SteamGameCoordinator = new SteamGameCoordinator(client, 730);

It's intended to have the same API as SteamClient's 'message'/send except it uses a different CMsgProtoBufHeader.

'message'/send

Sending and receiving Game Coordinator messages is designed to be symmetrical, so the event and the method are documented together. Both have the following arguments:

  • header - an object representing the message header. It has the following properties:
    • msg - the game-specific "type" of the message (no protomask).
    • proto - a CMsgProtoBufHeader object if this message is protobuf-backed, otherwise header.proto is falsy. The fields job_id_source and job_id_target are reserved for internal use and shall be ignored. (Note: pass an empty object if you don't need to set any fields)
  • body - a Buffer containing the rest of the message. (Note: in SteamKit2's terms, this is "Body" plus "Payload")
  • callback (optional) - if not falsy, then this message is a request, and callback shall be called with any response to it instead of 'message'/send. callback has the same arguments as 'message'/send.

The 'message' event is only emitted by a SteamGameCoordinator instance if it was initialized with the same AppID as that of the incoming message. When sending a message, it uses the AppID it was initialized with.

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago