refactor IServerSocket

This commit is contained in:
2025-08-06 17:16:50 +02:00
parent fb53ece340
commit 89213e9a97
7 changed files with 39 additions and 30 deletions

View File

@@ -13,7 +13,7 @@ class IServerSocket {
utils::Signal<PlayerID> OnDisconnect;
utils::Signal<PlayerID, const protocol::PacketBase&> OnReceive;
virtual void Send(PlayerID, const protocol::PacketBase&) = 0;
void Send(PlayerID a_PlayerId, const protocol::PacketBase& a_Packet);
IServerSocket() {}
virtual ~IServerSocket() {}
@@ -25,6 +25,7 @@ class IServerSocket {
void OnConnectPeer(PeerID a_PeerId);
void OnDisconnectPeer(PeerID a_PeerId);
void OnReceivePeer(PeerID a_PeerId, const protocol::PacketBase& a_Packet);
virtual void SendPeer(PeerID a_PeerId, const protocol::PacketBase& a_Packet) = 0;
};
} // namespace server