Enum sc2::Signal
[−]
[src]
pub enum Signal { GetInstancePool, GetPortsPool, LaunchInstance, InstancePool(HashMap<Uuid, (Url, PortSet)>), PortsPool(Vec<GamePorts>), ProvideInstance(Uuid, Url), ClientAttemptConnect(Url), ClientConnected(Sender<Message>), ClientReceive(Message), ClientRequest(ClientRequest), ClientResult(ClientResult), ClientTimeout(Uuid), ClientDisconnect, ClientClosed, ClientError(Rc<Error>), Ready, RequestPlayerSetup(GameSettings), PlayerSetup(PlayerSetup), CreateGame(GameSettings, Vec<PlayerSetup>), GameCreated, GameReady(PlayerSetup, Option<GamePorts>), JoinGame(GamePorts), FetchGameData, GameDataReady, RequestUpdateInterval, UpdateInterval(u32), GameStarted, Observe, Observation(Rc<FrameData>), Command(Command), DebugCommand(DebugCommand), UpdateComplete, GameEnded, }
the messages that can be sent between Sc2 capable
Variants
GetInstancePool
get instances pool
GetPortsPool
get the ports pool
LaunchInstance
launch an instance
InstancePool(HashMap<Uuid, (Url, PortSet)>)
the pool of instances to choose from
PortsPool(Vec<GamePorts>)
the pool of game ports to choose from (num_instances / 2)
ProvideInstance(Uuid, Url)
allow a soma to take complete control of an instance
ClientAttemptConnect(Url)
attempt to connect to instance
ClientConnected(Sender<Message>)
internal-use client successfully connected to instance
ClientReceive(Message)
internal-use client received a message
ClientRequest(ClientRequest)
send some request to the game instance
ClientResult(ClientResult)
result of transaction with game instance
ClientTimeout(Uuid)
internal-use message used to indicate when a transaction has timed out
ClientDisconnect
disconnect from the instance
ClientClosed
client has closed
ClientError(Rc<Error>)
client encountered a websocket error
Ready
agent is ready for a game to begin
RequestPlayerSetup(GameSettings)
request player setup
PlayerSetup(PlayerSetup)
respond with player setup
CreateGame(GameSettings, Vec<PlayerSetup>)
create a game with the given settings and list of participants
GameCreated
game was created with the given settings
GameReady(PlayerSetup, Option<GamePorts>)
notify agents that game is ready to join with the given player setup
JoinGame(GamePorts)
join an existing game
FetchGameData
fetch the game data
GameDataReady
game data ready
RequestUpdateInterval
request update interval from player
UpdateInterval(u32)
respond with update interval in game steps
GameStarted
game started
Observe
observe the game state
Observation(Rc<FrameData>)
current game state
Command(Command)
issue a command to the game instance
DebugCommand(DebugCommand)
issue a debug command to the game instance
UpdateComplete
notify the stepper that the soma is done updating
GameEnded
game ended