]> git.lizzy.rs Git - minetest.git/blobdiff - src/connection.h
Don't use msvc libs for mingw build
[minetest.git] / src / connection.h
index 486cf331fa755a9efe42242230ac4fb401ed6670..a1d564849810b1afc1d995ed858c56d2cf03db72 100644 (file)
@@ -191,15 +191,14 @@ TODO: Should we have a receiver_peer_id also?
        [6] u8 channel
 sender_peer_id:
        Unique to each peer.
-       value 0 is reserved for making new connections
-       value 1 is reserved for server
+       value 0 (PEER_ID_INEXISTENT) is reserved for making new connections
+       value 1 (PEER_ID_SERVER) is reserved for server
+       these constants are defined in constants.h
 channel:
        The lower the number, the higher the priority is.
        Only channels 0, 1 and 2 exist.
 */
 #define BASE_HEADER_SIZE 7
-#define PEER_ID_INEXISTENT 0
-#define PEER_ID_SERVER 1
 #define CHANNEL_COUNT 3
 /*
 Packet types:
@@ -281,7 +280,7 @@ class ReliablePacketBuffer
        u32 size();
        RPBSearchResult findPacket(u16 seqnum);
        RPBSearchResult notFound();
-       u16 getFirstSeqnum();
+       bool getFirstSeqnum(u16 *result);
        BufferedPacket popFirst();
        BufferedPacket popSeqnum(u16 seqnum);
        void insert(BufferedPacket &p);
@@ -548,8 +547,8 @@ struct ConnectionCommand
 class Connection: public SimpleThread
 {
 public:
-       Connection(u32 protocol_id, u32 max_packet_size, float timeout);
-       Connection(u32 protocol_id, u32 max_packet_size, float timeout,
+       Connection(u32 protocol_id, u32 max_packet_size, float timeout, bool ipv6);
+       Connection(u32 protocol_id, u32 max_packet_size, float timeout, bool ipv6,
                        PeerHandler *peerhandler);
        ~Connection();
        void * Thread();