mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.
Because we get a Buffer<u8> from ConnectionEvent, don't convert it to SharedBuffer<u8> and return it to Server/Client::Receive which will convert it to NetworkPacket Instead, put the Buffer<u8> directly to NetworkPacket and return it to packet processing This remove a long existing memory copy Also check the packet size directly into Connection::Receive instead of packet processing
This commit is contained in:
@@ -392,7 +392,7 @@ public:
|
||||
void handleCommand_LocalPlayerAnimations(NetworkPacket* pkt);
|
||||
void handleCommand_EyeOffset(NetworkPacket* pkt);
|
||||
|
||||
void ProcessData(u8 *data, u32 datasize, u16 sender_peer_id);
|
||||
void ProcessData(NetworkPacket *pkt);
|
||||
|
||||
// Returns true if something was received
|
||||
bool AsyncProcessPacket();
|
||||
|
Reference in New Issue
Block a user