Notify the client that the authentication has completed and tell that for the remainder of this socket encryption is enabled. */
| 456 | |
| 457 | /** Notify the client that the authentication has completed and tell that for the remainder of this socket encryption is enabled. */ |
| 458 | NetworkRecvStatus ServerNetworkGameSocketHandler::SendEnableEncryption() |
| 459 | { |
| 460 | Debug(net, 9, "client[{}] SendEnableEncryption()", this->client_id); |
| 461 | |
| 462 | /* Invalid packet when status is anything but STATUS_AUTH_GAME. */ |
| 463 | if (this->status != STATUS_AUTH_GAME) return this->CloseConnection(NETWORK_RECV_STATUS_MALFORMED_PACKET); |
| 464 | |
| 465 | auto p = std::make_unique<Packet>(this, PACKET_SERVER_ENABLE_ENCRYPTION); |
| 466 | this->authentication_handler->SendEnableEncryption(*p); |
| 467 | this->SendPacket(std::move(p)); |
| 468 | return NETWORK_RECV_STATUS_OKAY; |
| 469 | } |
| 470 | |
| 471 | /** Send the client a welcome message with some basic information. */ |
| 472 | NetworkRecvStatus ServerNetworkGameSocketHandler::SendWelcome() |
no test coverage detected