Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sending messages

There are three different types of messages you can send to steam:

  • One-shot messages
  • Job messages
  • Rpc messages

One-shot messages

One-shot messages are messages sent by the client where no response is expected.

You can send one-show messages with Connection::send, the returned future will complete as soon as the message has been send.

Job messages

Job messages are messages that expect a response from steam

You can send job messages with Connection::job, the returned future will complete once steam returns a response or the response times out.

Note that type of the response isn't specified in the steam protobufs, you fill thus need to manually specify the response type.

Rpc messages

Rpc messages are messages that expect a response from steam

You can send job messages with Connection::service_method, the returned future will complete once steam returns a response or the response times out.

For rpc messages, the return type of the response is specified in the protobufs and you will thus not need to specify the return type.

Rpc messages are denoted in the protobufs by being included in a service block. See for example the FriendMessages service.

In the generated code for the protobufs, rpc messages implement the ServiceMethodRequest trait.