Input: InitMessage
Output: on success return InitAckMessage or AuthServerChallengeMessage, on error return ErrorMessage with properly reason.
Description
Initialize a session to PokerTH server. On success, the function return specific message to client depend on LoginType of InitMessage. Return InitAckMessage if LoginType is unauthenticatedLogin or guestLogin, AuthServerChallengeMessage if LoginType is authenticatedLogin.
Possible error messages:
- ERR_NET_INIT_BLOCKED: Brute force attack prevention.
- ERR_NET_VERSION_NOT_SUPPORTED: Client version is out dated.
- ERR_NET_INVALID_PLAYER_NAME: Bad player name.
- ERR_INVALID_PASSWORD: Authentication is required and server received invalid password.
- ERR_NET_PLAYER_BANNED: Player has banned.