Skip to content
Snippets Groups Projects
  • Loïc Blot's avatar
    1fe42564
    Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>. · 1fe42564
    Loïc Blot authored
    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
    1fe42564
    History
    Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.
    Loïc Blot authored
    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