![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Functions | |
| std::uint16_t | GetDefaultPort () |
| bool | IsNetController () |
| bool | HasNetServer () |
| bool | HasNetClient () |
| void | StartNetworkHost (const CStrW &playerName, const std::uint16_t serverPort, const CStr &password, const bool continueSavedGame, bool storeReplay) |
| void | StartNetworkJoin (const CStrW &playerName, const CStr &serverAddress, std::uint16_t 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 Script::Interface &guiInterface) |
| void | SendGameSetupMessage (const Script::Interface &scriptInterface, JS::HandleValue attribs1) |
| void | AssignNetworkPlayer (int playerID, const CStr &guid) |
| void | KickPlayer (const CStrW &playerName, bool ban) |
| void | SendNetworkChat (const Script::Request &rq, const CStrW &message, JS::HandleValue handle) |
| void | SendNetworkReady (int message) |
| void | ClearAllPlayerReady () |
| void | StartNetworkGame (const Script::Interface &scriptInterface, JS::HandleValue savegame, JS::HandleValue attribs1) |
| void | SetTurnLength (int length) |
| void | SendNetworkFlare (JS::HandleValue position) |
| void | RegisterScriptFunctions (const Script::Request &rq) |
| void JSI_Network::AssignNetworkPlayer | ( | int | playerID, |
| const CStr & | guid | ||
| ) |
| void JSI_Network::ClearAllPlayerReady | ( | ) |
| void JSI_Network::DisconnectNetworkGame | ( | ) |
| std::uint16_t 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 Script::Interface & | guiInterface | ) |
| void JSI_Network::RegisterScriptFunctions | ( | const Script::Request & | rq | ) |
| void JSI_Network::SendGameSetupMessage | ( | const Script::Interface & | scriptInterface, |
| JS::HandleValue | attribs1 | ||
| ) |
| void JSI_Network::SendNetworkChat | ( | const Script::Request & | rq, |
| const CStrW & | message, | ||
| JS::HandleValue | handle | ||
| ) |
| void JSI_Network::SendNetworkFlare | ( | JS::HandleValue | position | ) |
| void JSI_Network::SendNetworkReady | ( | int | message | ) |
| void JSI_Network::SetTurnLength | ( | int | length | ) |
| void JSI_Network::StartNetworkGame | ( | const Script::Interface & | scriptInterface, |
| JS::HandleValue | savegame, | ||
| JS::HandleValue | attribs1 | ||
| ) |
| void JSI_Network::StartNetworkHost | ( | const CStrW & | playerName, |
| const std::uint16_t | serverPort, | ||
| const CStr & | password, | ||
| const bool | continueSavedGame, | ||
| 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 CStrW & | playerName, |
| const CStr & | serverAddress, | ||
| std::uint16_t | 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.