-
- Downloads
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
Showing
- src/client.cpp 8 additions, 16 deletionssrc/client.cpp
- src/client.h 1 addition, 1 deletionsrc/client.h
- src/network/connection.cpp 15 additions, 8 deletionssrc/network/connection.cpp
- src/network/connection.h 3 additions, 1 deletionsrc/network/connection.h
- src/network/networkpacket.cpp 14 additions, 11 deletionssrc/network/networkpacket.cpp
- src/network/networkpacket.h 4 additions, 1 deletionsrc/network/networkpacket.h
- src/server.cpp 11 additions, 14 deletionssrc/server.cpp
- src/server.h 1 addition, 1 deletionsrc/server.h
- src/test.cpp 47 additions, 45 deletionssrc/test.cpp
Loading
Please register or sign in to comment