AuthServer: Difference between revisions
From OuroDev
Line 36: | Line 36: | ||
====Incoming Packets==== | ====Incoming Packets==== | ||
"DBServer Function / AuthServer Function" | |||
{| class="wikitable" | {| class="wikitable" | ||
!Opcode | !Opcode | ||
Line 42: | Line 43: | ||
|- | |- | ||
|AS_PLAY_OK | |AS_PLAY_OK | ||
| | |authSendPlayOK / ServerPlayOk | ||
|dd | |dd | ||
|- | |- | ||
|AS_PLAY_FAIL | |AS_PLAY_FAIL | ||
| | |authSendPlayFail / ServerPlayFail | ||
|cd | |cd | ||
|- | |- | ||
|AS_PLAY_GAME | |AS_PLAY_GAME | ||
| | |authSendPlayGame / ServerPlayGame | ||
|d | |d | ||
|- | |- | ||
|AS_QUIT_GAME | |AS_QUIT_GAME | ||
| | |authSendQuitGame / ServerPlayQuit | ||
|dwd | |dwd | ||
|- | |- | ||
|AS_KICK_ACCOUNT | |AS_KICK_ACCOUNT | ||
| | |authSendKickAccount / ServerKickAccount | ||
|dw | |dw | ||
|- | |- | ||
|AS_SERVER_USERNUM | |AS_SERVER_USERNUM | ||
| | |/ ServerGetUserNum | ||
| | |ww | ||
|- | |- | ||
|AS_BAN_USER | |AS_BAN_USER | ||
| | |authSendBanAccount / ServerBanUser | ||
|dw | |dw | ||
|- | |- | ||
|AS_VERSION | |AS_VERSION | ||
| | |authSendVersion / ServerVersion | ||
|d | |d | ||
|- | |- | ||
|AS_PING | |AS_PING | ||
| | |authSendPing / ServerPing | ||
|d | |d | ||
|- | |- | ||
|AS_WRITE_USERDATA | |AS_WRITE_USERDATA | ||
| | |authSendUserData / ServerWriteUserData | ||
|db | |db | ||
|- | |- | ||
|AS_SET_CONNECT | |AS_SET_CONNECT | ||
| | |authSendSetConnect / ServerSetActive | ||
|d | |d | ||
|- | |- | ||
|AS_PLAY_USER_LIST | |AS_PLAY_USER_LIST | ||
| | |authReconnectOnePlayer / ServerPlayUserList | ||
|dsddddd | |dsddddd | ||
|- | |- | ||
|AS_SET_SERVER_ID | |AS_SET_SERVER_ID | ||
| | |/ SetServerId | ||
| | |cw | ||
|- | |- | ||
|AS_SERVER_USER_NUM_BY_QUEUE_LEVEL | |AS_SERVER_USER_NUM_BY_QUEUE_LEVEL | ||
| | |/ ServerUserNumByQueueLevel | ||
| - | | - | ||
|- | |- | ||
|AS_FINISHED_QUEUE | |AS_FINISHED_QUEUE | ||
| | |/ FinishedQueue | ||
| | |d | ||
|- | |- | ||
|AS_SET_LOGIN_FREQUENCY | |AS_SET_LOGIN_FREQUENCY | ||
| | |/ SetLoginFrequency | ||
| - | | - | ||
|- | |- | ||
|AS_QUEUE_SIZES | |AS_QUEUE_SIZES | ||
| | |/ QueueSizes | ||
| | |c[cdd] | ||
|- | |- | ||
|AS_READ_USERDATA | |AS_READ_USERDATA | ||
| | |/ ServerReadUserData | ||
| | |d | ||
|- | |- | ||
|AS_WRITE_GAMEDATA | |AS_WRITE_GAMEDATA | ||
| | |authSendUserData / ServerWriteGameData | ||
|db | |db | ||
|- | |- | ||
|AS_READ_GAMEDATA | |AS_READ_GAMEDATA | ||
| | |authSendGameDataReq / ServerReadGameData | ||
|d | |d | ||
|- | |- | ||
|AS_SHARD_TRANSFER | |AS_SHARD_TRANSFER | ||
| | |authSendShardTransfer / ServerShardTransfer | ||
|dd | |dd | ||
|} | |} | ||
====Outgoing Packets==== | ====Outgoing Packets==== | ||
"AuthServer Function / DBServer Function" | |||
{| class="wikitable" | {| class="wikitable" | ||
!Opcode | !Opcode | ||
Line 133: | Line 135: | ||
|- | |- | ||
|SQ_ABOUT_TO_PLAY | |SQ_ABOUT_TO_PLAY | ||
| | |AccountDB::AboutToPlay / handleAboutToPlay | ||
|dsdddd | |dsdddd | ||
|- | |- | ||
|SQ_KICK_ACCOUNT | |SQ_KICK_ACCOUNT | ||
| | |AccountDB::KickAccount / handleKickAccount | ||
|dcs | |dcs | ||
|- | |- | ||
|SQ_SERVER_NUM | |SQ_SERVER_NUM | ||
| | |RequestUserCounts / handleNumOnline | ||
| | | | ||
|- | |- | ||
|SQ_VERSION | |SQ_VERSION | ||
| | |CSocketServer::OnCreate / handleVersion | ||
|sd(d) | |sd(d) | ||
|- | |- | ||
|SQ_PING | |SQ_PING | ||
| | |ServerPing / handlePing | ||
| | |d | ||
|- | |- | ||
|SQ_COMPLETE_USERLIST | |SQ_COMPLETE_USERLIST | ||
| | |ServerPlayUserList / handleCompleteUserList | ||
|d | |d | ||
|- | |- | ||
|SQ_USER_DATA | |SQ_USER_DATA | ||
| | |ServerReadUserData / | ||
|db | |db | ||
|- | |- | ||
|SQ_GAME_DATA | |SQ_GAME_DATA | ||
| | |ServerReadGameData / handleRecvGameData | ||
|db | |db | ||
|} | |} |
Revision as of 23:59, 2 September 2020
Responsible for user authentication and session creation. Cross-shard capabilities.
Communication Protocols
In the sections below, the table column "Structure" is denoted in a similar format used by the server source. Minus the opcode, which is type c anyways.
Type | Description |
---|---|
c | Char |
w | Word / Short |
d | DWord / Int |
q | QWord / Long |
b | Byte Array |
s | NUL-terminated C String |
[] | Array |
() | Conditional, based on config |
Game Server
TCP Port 2104. AuthServer and DBServer communicate through this port.
Incoming Packets
"DBServer Function / AuthServer Function"
Opcode | Description | Structure |
---|---|---|
AS_PLAY_OK | authSendPlayOK / ServerPlayOk | dd |
AS_PLAY_FAIL | authSendPlayFail / ServerPlayFail | cd |
AS_PLAY_GAME | authSendPlayGame / ServerPlayGame | d |
AS_QUIT_GAME | authSendQuitGame / ServerPlayQuit | dwd |
AS_KICK_ACCOUNT | authSendKickAccount / ServerKickAccount | dw |
AS_SERVER_USERNUM | / ServerGetUserNum | ww |
AS_BAN_USER | authSendBanAccount / ServerBanUser | dw |
AS_VERSION | authSendVersion / ServerVersion | d |
AS_PING | authSendPing / ServerPing | d |
AS_WRITE_USERDATA | authSendUserData / ServerWriteUserData | db |
AS_SET_CONNECT | authSendSetConnect / ServerSetActive | d |
AS_PLAY_USER_LIST | authReconnectOnePlayer / ServerPlayUserList | dsddddd |
AS_SET_SERVER_ID | / SetServerId | cw |
AS_SERVER_USER_NUM_BY_QUEUE_LEVEL | / ServerUserNumByQueueLevel | - |
AS_FINISHED_QUEUE | / FinishedQueue | d |
AS_SET_LOGIN_FREQUENCY | / SetLoginFrequency | - |
AS_QUEUE_SIZES | / QueueSizes | c[cdd] |
AS_READ_USERDATA | / ServerReadUserData | d |
AS_WRITE_GAMEDATA | authSendUserData / ServerWriteGameData | db |
AS_READ_GAMEDATA | authSendGameDataReq / ServerReadGameData | d |
AS_SHARD_TRANSFER | authSendShardTransfer / ServerShardTransfer | dd |
Outgoing Packets
"AuthServer Function / DBServer Function"
Opcode | Description | Structure |
---|---|---|
SQ_ABOUT_TO_PLAY | AccountDB::AboutToPlay / handleAboutToPlay | dsdddd |
SQ_KICK_ACCOUNT | AccountDB::KickAccount / handleKickAccount | dcs |
SQ_SERVER_NUM | RequestUserCounts / handleNumOnline | |
SQ_VERSION | CSocketServer::OnCreate / handleVersion | sd(d) |
SQ_PING | ServerPing / handlePing | d |
SQ_COMPLETE_USERLIST | ServerPlayUserList / handleCompleteUserList | d |
SQ_USER_DATA | ServerReadUserData / | db |
SQ_GAME_DATA | ServerReadGameData / handleRecvGameData | db |
Game Client
TCP Port 2106. AuthServer and Game communicate through this port.
Incoming Packets
Opcode | Description | Structure |
---|---|---|
AQ_LOGIN | dbdw(c) | |
AQ_SERVER_LIST | ddc(c[d]) | |
AQ_ABOUT_TO_PLAY | ddc | |
AQ_LOGOUT | dd | |
AQ_LOGIN_MD5 | dbdw(c) | |
AQ_SERVER_LIST_EXT | ddc(c[d]) | |
AQ_LOGIN_MD5_MD5 | Asia auth only | - |
Outgoing Packets
Opcode | Description | Structure |
---|---|---|
AC_PROTOCOL_VER | Exchange common protocol version with client | dddbdb |
AC_LOGIN_FAIL | Reject client authentication | c |
AC_BLOCKED_ACCOUNT | Account banned for X until Y | dd |
AC_LOGIN_OK | Allow client authentication | dddddddddddd(dd) |
AC_SEND_SERVERLIST | Send list of shards | c[cddccwwcc(cs)] |
AC_SEND_SERVER_FAIL | Something unexpected happened | c |
AC_PLAY_FAIL | Server selected, but down possibly? | c |
AC_PLAY_OK | Server selected, continue | ddc |
AC_ACCOUNT_KICKED | Account kicked for X | c |
AC_BLOCKED_ACCOUNT_WITH_MSG | Account permabanned for X | s |
AC_SC_CHECK_REQ | - | - |
AC_QUEUE_SIZE | Queue length and wait time | c[ccdd] |
AC_HANDOFF_TO_QUEUE | Wait in server queue | ddc |
AC_POSITION_IN_QUEUE | - | - |
GM Tools
TCP Port 2108. Used for internal administration.
Incoming Packets
Opcode | Description | Structure |
---|---|---|
IA_SERVER_VERSION | GetConnectSessionKey | d |
IA_IP_KIND | - | - |
IA_IP_USE | GetIPAcquireSuccess | dcdd |
IA_IP_START_OK | StartIPCharge | dcddd |
IA_IP_START_FAIL | StartIPChargeFail | dcddds |
IA_IP_USE_FAIL | GetIPAcquireFail | dc |
IA_IP_SESSIONKEY | - | - |
IA_IP_INSTANTLOGIN_OK | - | - |
IA_IP_INSTANTLOGIN_FAIL | - | - |
IA_IP_KICK | GetIPKick | dddsd |
IA_IP_READY_FAIL | ReadyIPFail | dc |
IA_IP_READY_OK | ReadyIPOK | dcddd |
IA_IP_SET_STARTTIME_OK | - | - |
IA_IP_SET_STARTTIME_FAIL | SetStartTimeFail | d |
Outgoing Packets
Opcode | Description | Structure |
---|---|---|
AI_SERVER_VERSION | sc | |
AI_IP_KIND | - | - |
AI_IP_ACQUIRE | sddd | |
AI_IP_RELEASE | ddddd | |
AI_IP_START_CHARGE | dddcdd | |
AI_IP_STOP_CHARGE | ddddcddsd | |
AI_IP_INSTANT_START_GAME | - | - |
AI_IP_INSTANT_STOP_GAME | - | - |
AI_IP_KICKED | - | - |
AI_IP_READY_GAME | dddcdd | |
AI_IP_SET_START_TIME | dddcdd |