MCPcopy Create free account
hub / github.com/cuberite/cuberite / ParseHandshake

Method ParseHandshake

src/Protocol/Protocol132.cpp:487–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485
486
487int cProtocol132::ParseHandshake(void)
488{
489 HANDLE_PACKET_READ(ReadByte, Byte, ProtocolVersion);
490 HANDLE_PACKET_READ(ReadBEUTF16String16, AString, Username);
491 HANDLE_PACKET_READ(ReadBEUTF16String16, AString, ServerHost);
492 HANDLE_PACKET_READ(ReadBEInt, int, ServerPort);
493 m_Username = Username;
494
495 if (!m_Client->HandleHandshake( m_Username ))
496 {
497 return PARSE_OK; // Player is not allowed into the server
498 }
499
500 // Send a 0xfd Encryption Key Request http://wiki.vg/Protocol#0xFD
501 SendEncryptionKeyRequest();
502
503 return PARSE_OK;
504}
505
506
507

Callers

nothing calls this directly

Calls 1

HandleHandshakeMethod · 0.80

Tested by

no test coverage detected