NetworkDesign: Difference between revisions
Content deleted Content added
imported>StephenIerodiaconou |
imported>Quisar |
||
Line 99:
Client Server
------ ------
--Anytime:
Send C2S Login Request Key Send S2C Send Key
--onConnect:
Send C2S Login Promise Send
Send C2S Login Send Nonce
Send S2C Login ACK▼
Name and Password If C2S Login is
Send S2C Login
end if
Send S2C Character List
Send S2C Server Info
Send Choose Character If character is correct
Send Choose Character ACK
else
Send Choose Character NACK
Finish
--onTimer:
Send Perception ACK Send Perception
--on RPManager request:
Send TransferREQ
Send TranferACK
Send Transfer
--onEvent:
Send Action Send Action ACK
--onExit:
Send Logout If Client can logout
Send Logout ACK
else
Send Logout NAC
</pre>
Let's discuss in detail each message type.
==Message C2S Login Request Key==
This Login Message is sent from the Client to the Server to request the RSA public key of the server.
The login Message is sent from the Client to the Server to request the right to access to the game. The message is composed of a username and password. The Username is a string that is already registered on the Server as the name of a user account. Password is a string that is associated with that account. If the username/password combination is correct then the Server must send a Login ACK Message to indicate to the Client that the message has been correctly processed. However, if the username/password is wrong the Server will send a Login NACK (Not ACKnoledge).▼
==Message S2C Login Send Key==
This Login Message os sent from the Server to the Client in response to a key request. It is composed of two bytes arrays. The first one contains the value of 'n', and the second the value of 'e'.
==Message C2S Login Promise==
This is the first real action of authentification from the client. It computes a nonce (a random number) and sent a hash of its nonce to the server. This message contains the hash as a bytes array.
==Message S2C Login Send Nonce==
The server responds to the client promise by computing a nonce and sending it in this message. This message contains the nonce as a bytes array.
==Message C2S Login Send Nonce Name and Password==
The client now sends:
- Its nonce.
- Its login.
- The value Crypt(xor(xor(client nonce, server nonce), password).
▲This message contains 3 fields. The
==Message S2C Login ACK==
| |||