]> git.lizzy.rs Git - minetest.git/blobdiff - src/connection.h
Merge pull request #13 from Bahamada/upstream_merge
[minetest.git] / src / connection.h
index 0b5d5e23019266e4496ffd5e2edcf512548bc7c5..6eb2f2824642cc86661fd4c788e5c090d515e366 100644 (file)
@@ -99,19 +99,6 @@ class ProcessedSilentlyException : public BaseException
        {}
 };
 
-class GotSplitPacketException
-{
-       SharedBuffer<u8> m_data;
-public:
-       GotSplitPacketException(SharedBuffer<u8> data):
-               m_data(data)
-       {}
-       SharedBuffer<u8> 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<u8> insert(BufferedPacket &p, bool reliable);
        
        void removeUnreliableTimedOuts(float dtime, float timeout);