Add simple SendMessage with single target

This commit is contained in:
Damian Korczowski
2021-04-16 22:08:59 +02:00
parent ed82787093
commit e7f899309c
5 changed files with 28 additions and 2 deletions

View File

@@ -137,6 +137,18 @@ bool NetworkManager::EndSendMessage(const int hostId, const NetworkChannelType c
return false;
}
bool NetworkManager::EndSendMessage(const int hostId, const NetworkChannelType channelType, const NetworkMessage& message, const NetworkConnection& target)
{
ASSERT(Hosts[hostId].IsValid());
NetworkHost& host = Hosts[hostId];
ASSERT(message.IsValid());
host.NetworkDriver->SendMessage(channelType, message, target);
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());