SVMP Wire Protocol

The SVMP wire protocol is specified and generated using the Protocol Buffers format (also referred to as simply “protobuf”). It is used to facilitate communication among the client, server, and VM. Each message is one of two “supertypes”, either a Request or a Response. These two message types act as wrappers, containing one of a variety of “subtypes” and extra information. Anything sent from the client is a Request, and anything sent to the client is a Response. Note that messages do not always imply an expected reply; i.e. a client can send certain Request messages without expecting a Response, and vice versa.

Each Request and Response has a type attribute that describes its subtype, and up to one optional attribute associated with that subtype. For instance, when written in JSON, a rotation information request looks like this:{"type":"ROTATIONINFO","rotationInfo":{"rotation":0}}
However, some messages only have a type without additional attributes. For instance, when written in JSON, a screen info request looks like this:{"type":"SCREENINFO"}

These message types can be viewed by looking at the protocol definition. Types are self-explanatory and separated based on what mechanism they are used for.
An example of the protocol sequence is below, where the client authenticates with the Overseer through its RESTAPI, opens a WebSocket connection with the server, and establishes a connection with the virtual machine: