Send the protocol version to the admin. */
| 146 | |
| 147 | /** Send the protocol version to the admin. */ |
| 148 | NetworkRecvStatus ServerNetworkAdminSocketHandler::SendProtocol() |
| 149 | { |
| 150 | this->status = ADMIN_STATUS_ACTIVE; |
| 151 | |
| 152 | auto p = std::make_unique<Packet>(this, ADMIN_PACKET_SERVER_PROTOCOL); |
| 153 | |
| 154 | /* announce the protocol version */ |
| 155 | p->Send_uint8(NETWORK_GAME_ADMIN_VERSION); |
| 156 | |
| 157 | for (int i = 0; i < ADMIN_UPDATE_END; i++) { |
| 158 | p->Send_bool (true); |
| 159 | p->Send_uint16(i); |
| 160 | p->Send_uint16(_admin_update_type_frequencies[i].base()); |
| 161 | } |
| 162 | |
| 163 | p->Send_bool(false); |
| 164 | this->SendPacket(std::move(p)); |
| 165 | |
| 166 | return this->SendWelcome(); |
| 167 | } |
| 168 | |
| 169 | /** Send a welcome message to the admin. */ |
| 170 | NetworkRecvStatus ServerNetworkAdminSocketHandler::SendWelcome() |
no test coverage detected