Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Functions | |
u16 | GetDefaultPort () |
bool | IsNetController () |
bool | HasNetServer () |
bool | HasNetClient () |
void | StartNetworkHost (const ScriptRequest &rq, const CStrW &playerName, const u16 serverPort, bool useSTUN, const CStr &password, bool storeReplay) |
void | StartNetworkJoin (const ScriptRequest &rq, const CStrW &playerName, const CStr &serverAddress, u16 serverPort, bool storeReplay) |
void | StartNetworkJoinLobby (const CStrW &playerName, const CStr &hostJID, const CStr &password) |
Requires XmppClient to send iq request to the server to get server's ip and port based on passed password. More... | |
void | DisconnectNetworkGame () |
CStr | GetPlayerGUID () |
JS::Value | PollNetworkClient (const ScriptInterface &guiInterface) |
void | SendGameSetupMessage (const ScriptInterface &scriptInterface, JS::HandleValue attribs1) |
void | AssignNetworkPlayer (int playerID, const CStr &guid) |
void | KickPlayer (const CStrW &playerName, bool ban) |
void | SendNetworkChat (const CStrW &message) |
void | SendNetworkReady (int message) |
void | ClearAllPlayerReady () |
void | StartNetworkGame (const ScriptInterface &scriptInterface, JS::HandleValue attribs1) |
void | SetTurnLength (int length) |
void | RegisterScriptFunctions (const ScriptRequest &rq) |
void JSI_Network::AssignNetworkPlayer | ( | int | playerID, |
const CStr & | guid | ||
) |
void JSI_Network::ClearAllPlayerReady | ( | ) |
void JSI_Network::DisconnectNetworkGame | ( | ) |
u16 JSI_Network::GetDefaultPort | ( | ) |
CStr JSI_Network::GetPlayerGUID | ( | ) |
bool JSI_Network::HasNetClient | ( | ) |
bool JSI_Network::HasNetServer | ( | ) |
bool JSI_Network::IsNetController | ( | ) |
void JSI_Network::KickPlayer | ( | const CStrW & | playerName, |
bool | ban | ||
) |
JS::Value JSI_Network::PollNetworkClient | ( | const ScriptInterface & | guiInterface | ) |
void JSI_Network::RegisterScriptFunctions | ( | const ScriptRequest & | rq | ) |
void JSI_Network::SendGameSetupMessage | ( | const ScriptInterface & | scriptInterface, |
JS::HandleValue | attribs1 | ||
) |
void JSI_Network::SendNetworkChat | ( | const CStrW & | message | ) |
void JSI_Network::SendNetworkReady | ( | int | message | ) |
void JSI_Network::SetTurnLength | ( | int | length | ) |
void JSI_Network::StartNetworkGame | ( | const ScriptInterface & | scriptInterface, |
JS::HandleValue | attribs1 | ||
) |
void JSI_Network::StartNetworkHost | ( | const ScriptRequest & | rq, |
const CStrW & | playerName, | ||
const u16 | serverPort, | ||
bool | useSTUN, | ||
const CStr & | password, | ||
bool | storeReplay | ||
) |
Password security - we want 0 A.D. to protect players from malicious hosts. We assume that clients might mistakenly send a personal password instead of the game password (e.g. enter their mail account's password on autopilot). Malicious dedicated servers might be set up to farm these failed logins and possibly obtain user credentials. Therefore, we hash the passwords on the client side before sending them to the server. This still makes the passwords potentially recoverable, but makes it much harder at scale. To prevent the creation of rainbow tables, hash with:
void JSI_Network::StartNetworkJoin | ( | const ScriptRequest & | rq, |
const CStrW & | playerName, | ||
const CStr & | serverAddress, | ||
u16 | serverPort, | ||
bool | storeReplay | ||
) |
void JSI_Network::StartNetworkJoinLobby | ( | const CStrW & | playerName, |
const CStr & | hostJID, | ||
const CStr & | password | ||
) |
Requires XmppClient to send iq request to the server to get server's ip and port based on passed password.
This is needed to not force server to share it's public ip with all potential clients in the lobby. XmppClient will also handle logic after receiving the answer.