summaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-31 10:35:51 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-31 11:01:08 +0200
commit1fe4256462826c218ed9bf171be4c07e0db33e25 (patch)
tree8c07a04333c23599376327e847d030cfe6bec162 /src/client.h
parentab77bf98ee320835e5dc50ed9b013442221f96e8 (diff)
downloadminetest-1fe4256462826c218ed9bf171be4c07e0db33e25.tar.gz
minetest-1fe4256462826c218ed9bf171be4c07e0db33e25.tar.bz2
minetest-1fe4256462826c218ed9bf171be4c07e0db33e25.zip
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
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client.h b/src/client.h
index 9db9764dd..7ec405fa6 100644
--- a/src/client.h
+++ b/src/client.h
@@ -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();