Add message sending to server

This commit is contained in:
Damian Korczowski
2021-03-15 20:28:41 +01:00
parent 77461e45c0
commit a90b3bd7f6
6 changed files with 60 additions and 3 deletions

View File

@@ -125,6 +125,18 @@ void NetworkManager::AbortSendMessage(const int hostId, const NetworkMessage& me
RecycleMessage(hostId, message);
}
bool NetworkManager::EndSendMessage(const int hostId, const NetworkChannelType channelType, const NetworkMessage& message)
{
ASSERT(Hosts[hostId].IsValid());
NetworkHost& host = Hosts[hostId];
ASSERT(message.IsValid());
host.NetworkDriver->SendMessage(channelType, message);
RecycleMessage(hostId, message);
return false;
}
bool NetworkManager::EndSendMessage(const int hostId, const NetworkChannelType channelType, const NetworkMessage& message, const Array<NetworkConnection> targets)
{
ASSERT(Hosts[hostId].IsValid());