begin client-server

This commit is contained in:
2025-08-06 20:10:56 +02:00
parent 89213e9a97
commit c813c49707
26 changed files with 264 additions and 188 deletions

View File

@@ -21,5 +21,11 @@ void IServerSocket::Send(PlayerID a_PlayerId, const protocol::PacketBase& a_Pack
SendPeer(m_Ids.GetPeerId(a_PlayerId), a_Packet);
}
void IServerSocket::Broadcast(const protocol::PacketBase& a_Packet) {
for (auto [peerId, playerId] : m_Ids) {
SendPeer(peerId, a_Packet);
}
}
} // namespace server
} // namespace td