mirror of
https://github.com/minetest/minetest.git
synced 2025-07-07 02:10:22 +02:00
Rework packet receiving in ServerThread
Notably it tries to receive all queued packets between server steps, not just one.
This commit is contained in:
@ -771,6 +771,7 @@ public:
|
||||
bool Connected();
|
||||
void Disconnect();
|
||||
void Receive(NetworkPacket* pkt);
|
||||
bool TryReceive(NetworkPacket *pkt);
|
||||
void Send(session_t peer_id, u8 channelnum, NetworkPacket *pkt, bool reliable);
|
||||
session_t GetPeerID() const { return m_peer_id; }
|
||||
Address GetPeerAddress(session_t peer_id);
|
||||
@ -803,6 +804,8 @@ protected:
|
||||
UDPSocket m_udpSocket;
|
||||
MutexedQueue<ConnectionCommand> m_command_queue;
|
||||
|
||||
bool Receive(NetworkPacket *pkt, u32 timeout);
|
||||
|
||||
void putEvent(ConnectionEvent &e);
|
||||
|
||||
void TriggerSend();
|
||||
|
Reference in New Issue
Block a user