GameCoordinator is used to proxy messages from/to GC. It takes care of the encapsulation details, but on its own is not enough to communicate with a given GC.

Example implementation of Dota 2 GC client with inheritance.

import myDotaModule
from steam import SteamClient
from steam.core.msg import GCMsgHdrProto
from steam.client.gc import GameCoordinator

class ExampleDotaClient(GameCoordinator):
    def __init__(self, steam):
        GameCoordinator.__init__(self, steam, 570)

    def _process_gc_message(self, emsg, header, body):
        if emsg == 4004: # EMsgGCClientWelcome
            message = myDotaModule.gcsdk_gcmessages_pb2.CMsgClientWelcome()
            print message

    def send_hello(self):
        header = GCMsgHdrProto(4006)  # EMsgGCClientHello
        body = myDotaModule.gcsdk_gcmessages_pb2.CMsgClientHello()
        self.send(header, body.SerializeToString())

client = SteamClient()
dota = ExampleDotaClient(client)


The above code assumes that we have a myDotaModule that contains the appropriate protobufs needed to (de)serialize message for communication with GC.

class steam.client.gc.GameCoordinator(steam_client, app_id)

Bases: eventemitter.EventEmitter

GameCoordinator is used to proxy messages from/to GC


Incoming messages are emitted as events using their EMsg as an event identifier.

  • header (steam.core.msg.GCMsgHdr) – message header
  • body (bytes) – raw message body
send(header, body)

Send a message to GC

  • header (steam.core.msg.GCMsgHdr) – message header
  • body (bytes) – serialized body of the message