]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/connection.h
Textureable sun and moon.
[dragonfireclient.git] / src / connection.h
index c9474032d1836a1be63b8d144a50f0e774d91e3f..43fd2fb88e8b6735a4f46d53dbbfe6e063bee630 100644 (file)
@@ -339,13 +339,11 @@ class ReliablePacketBuffer
        RPBSearchResult findPacket(u16 seqnum);
 
        std::list<BufferedPacket> m_list;
-       u16 m_list_size;
+       u32 m_list_size;
 
        u16 m_oldest_non_answered_ack;
 
        JMutex m_list_mutex;
-
-       unsigned int writeptr;
 };
 
 /*
@@ -406,7 +404,6 @@ enum ConnectionCommandType{
 struct ConnectionCommand
 {
        enum ConnectionCommandType type;
-       u16 port;
        Address address;
        u16 peer_id;
        u8 channelnum;
@@ -416,10 +413,10 @@ struct ConnectionCommand
 
        ConnectionCommand(): type(CONNCMD_NONE), peer_id(PEER_ID_INEXISTENT), reliable(false), raw(false) {}
 
-       void serve(u16 port_)
+       void serve(Address address_)
        {
                type = CONNCMD_SERVE;
-               port = port_;
+               address = address_;
        }
        void connect(Address address_)
        {
@@ -912,7 +909,7 @@ class ConnectionSendThread : public JThread {
 
        void processReliableCommand (ConnectionCommand &c);
        void processNonReliableCommand (ConnectionCommand &c);
-       void serve          (u16 port);
+       void serve          (Address bind_address);
        void connect        (Address address);
        void disconnect     ();
        void disconnect_peer(u16 peer_id);
@@ -976,7 +973,6 @@ class ConnectionReceiveThread : public JThread {
 
 
        Connection*           m_connection;
-       unsigned int          m_max_packet_size;
 };
 
 class Connection
@@ -996,7 +992,7 @@ class Connection
        void putCommand(ConnectionCommand &c);
        
        void SetTimeoutMs(int timeout){ m_bc_receive_timeout = timeout; }
-       void Serve(unsigned short port);
+       void Serve(Address bind_addr);
        void Connect(Address address);
        bool Connected();
        void Disconnect();
@@ -1005,7 +1001,7 @@ class Connection
        void Send(u16 peer_id, u8 channelnum, SharedBuffer<u8> data, bool reliable);
        u16 GetPeerID(){ return m_peer_id; }
        Address GetPeerAddress(u16 peer_id);
-       float GetPeerAvgRTT(u16 peer_id);
+       float getPeerStat(u16 peer_id, rtt_stat_type type);
        const u32 GetProtocolID() const { return m_protocol_id; };
        const std::string getDesc();
        void DisconnectPeer(u16 peer_id);