SC2API
An API for AI for StarCraft II
Public Member Functions | Protected Attributes | List of all members
sc2::ProtoInterface Class Reference

Public Member Functions

bool ConnectToGame (const std::string &address, int port, int timeout_ms)
 
GameRequestPtr MakeRequest ()
 
bool SendRequest (GameRequestPtr &request, bool ignore_pending_requests=false)
 
GameResponsePtr WaitForResponseInternal ()
 
bool PingGame ()
 
void Quit ()
 
void SetErrorCallback (std::function< void(const std::string &error_str)> error_callback)
 
bool PollResponse ()
 
SC2APIProtocol::Status GetLastStatus () const
 
bool HasResponsePending () const
 
SC2APIProtocol::Response::ResponseCase GetResponsePending () const
 
int GetAssignedPort () const
 
const std::vector< uint32_t > & GetStats () const
 
void SetControl (ControlInterface *control)
 
uint32_t GetBaseBuild () const
 
const std::string & GetDataVersion () const
 

Protected Attributes

Connection connection_
 
std::string address_
 
int port_
 
unsigned int default_timeout_ms_
 
std::function< void(const std::string &error_str)> error_callback_
 
SC2APIProtocol::Status latest_status_
 
SC2APIProtocol::Response::ResponseCase response_pending_
 
std::vector< uint32_t > count_uses_
 
ControlInterfacecontrol_
 
uint32_t base_build_
 
std::string data_version_
 

The documentation for this class was generated from the following file: