X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fconnection.h;h=6eb2f2824642cc86661fd4c788e5c090d515e366;hb=f37a3a84fafb91bcfc109fed95aa6d42726f1bf7;hp=0b5d5e23019266e4496ffd5e2edcf512548bc7c5;hpb=3fb0d2fb65c968f91c333a1d31d2d7a1a02ab7d1;p=minetest.git diff --git a/src/connection.h b/src/connection.h index 0b5d5e230..6eb2f2824 100644 --- a/src/connection.h +++ b/src/connection.h @@ -99,19 +99,6 @@ class ProcessedSilentlyException : public BaseException {} }; -class GotSplitPacketException -{ - SharedBuffer m_data; -public: - GotSplitPacketException(SharedBuffer data): - m_data(data) - {} - SharedBuffer getData() - { - return m_data; - } -}; - inline u16 readPeerId(u8 *packetdata) { return readU16(&packetdata[4]); @@ -314,10 +301,10 @@ class IncomingSplitBuffer public: ~IncomingSplitBuffer(); /* - This will throw a GotSplitPacketException when a full - split packet is constructed. + Returns a reference counted buffer of length != 0 when a full split + packet is constructed. If not, returns one of length 0. */ - void insert(BufferedPacket &p, bool reliable); + SharedBuffer insert(BufferedPacket &p, bool reliable); void removeUnreliableTimedOuts(float dtime, float timeout);