]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/connection.h
Place project name and gettext use in config
[dragonfireclient.git] / src / connection.h
index 73d04371039d91d955084c29de6ea31738da0fb9..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]);
@@ -209,7 +196,7 @@ TODO: Should we have a receiver_peer_id also?
        Only channels 0, 1 and 2 exist.
 */
 #define BASE_HEADER_SIZE 7
-#define PEER_ID_NEW 0
+#define PEER_ID_INEXISTENT 0
 #define PEER_ID_SERVER 1
 #define CHANNEL_COUNT 3
 /*
@@ -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);