| 127 | } |
| 128 | |
| 129 | net::ExtenderMessage* NetworkManager::GetFreeMessage() |
| 130 | { |
| 131 | auto client = GetClient(); |
| 132 | if (!client || client->Status == 0) { |
| 133 | ERR("Attempted to send extender message when not connected to a server!"); |
| 134 | return nullptr; |
| 135 | } |
| 136 | |
| 137 | // We need to make sure that no extender message is sent if the other party |
| 138 | // does not have the new message ID-s installed, otherwise the peer will crash |
| 139 | // while trying to parse the packet. |
| 140 | if (!extenderSupport_) { |
| 141 | ERR("Attempted to send extender message to a host that does not understand extender protocol!"); |
| 142 | return nullptr; |
| 143 | } |
| 144 | |
| 145 | return (net::ExtenderMessage*)client->NetMessageFactory->GetFreeMessage((uint32_t)net::ExtenderMessage::MessageId); |
| 146 | } |
| 147 | |
| 148 | net::ExtenderMessage* NetworkManager::GetFreeMessage(UserId userId) |
| 149 | { |
nothing calls this directly
no outgoing calls
no test coverage detected