void AuthSocket::OnRead() { if(GetReadBufferSize() < 1) return; uint8 Command = GetReadBuffer(0)[0]; // Handle depending on command switch(Command) { case 0: // AUTH_CHALLENGE last_recv = time(NULL); HandleChallenge(); break; case 1: // AUTH_PROOF last_recv = time(NULL); HandleProof(); break; case 0x10: // REALM_LIST last_recv = time(NULL); HandleRealmlist(); break; } }
void AuthSocket::OnReceive(const u16 Size) { if(Size < 1) return; uint8 Command = ReceiveBuffer[0]; // Handle depending on command switch(Command) { case 0: // AUTH_CHALLENGE HandleChallenge(); break; case 1: // AUTH_PROOF HandleProof(); break; case 0x10: // REALM_LIST HandleRealmlist(); break; } }