package
Version:
v0.0.0-...-b3db5e2
Opens a new window with list of versions in this module.
Published: Jan 21, 2016
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func DecodeMessage(in []byte) (out interface{}, token int64, err error)
func EncodeMessage(in interface{}, token int64) (out []byte, err error)
type AckCreate struct {
Id int64 `json:"id"`
Player int `json:"player"`
}
type AckJoin struct {
Error *string `json:"error"`
Player int `json:"player"`
RomImage *string `json:"rom_image"`
}
type Create struct {
Name string `json:"name"`
RomImage string `json:"rom_image"`
}
client -> server messages
type Join struct {
Id int64 `json:"id"`
}
type ServerInfo struct {
ApiVersion int `json:"api_version"`
}
server -> client messages
type Start struct {
Delay int `json:"delay"`
}
type Sync struct {
KeysDown [2]string `json:"keys_down"`
Tick int64 `json:"tick"`
}
type Update struct {
KeysDown string `json:"keys_down"`
Tick int64 `json:"tick"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.