stefanbeller/manaserv — comment on commit 9f25df23809aaf91c6bb67e882cbce7c8832af82
File:  line 0
By bjorn:

I've discussed this on IRC with @stefanbeller. I think we should make sure login is as fast as possible, so my suggestion is to move the exchange of salt to before the login process:

Immediately after connection is made, the following messages are exchanged:

PAMSG_HELLO // D version
APMSG_WELCOME // B error[, S random salt]

Client now knows its version was accepted and the random salt. The login sequence then becomes:

PAMSG_LOGIN // As-is, but with version removed
APMSG_LOGIN_RESPONSE // As-is

`PAMSG_LOGIN_RNDTRGR` and `APMSG_LOGIN_RNDTRGR_RESPONSE` are removed.