mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-19 03:05:29 +02:00
Move network protocol implementation behind an interface
This commit is contained in:
@@ -24,17 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
namespace con
|
||||
{
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MIN_RTT,
|
||||
MAX_RTT,
|
||||
AVG_RTT,
|
||||
MIN_JITTER,
|
||||
MAX_JITTER,
|
||||
AVG_JITTER
|
||||
} rtt_stat_type;
|
||||
|
||||
class Peer;
|
||||
class IPeer;
|
||||
|
||||
class PeerHandler
|
||||
{
|
||||
@@ -47,13 +37,13 @@ public:
|
||||
This is called after the Peer has been inserted into the
|
||||
Connection's peer container.
|
||||
*/
|
||||
virtual void peerAdded(Peer *peer) = 0;
|
||||
virtual void peerAdded(IPeer *peer) = 0;
|
||||
|
||||
/*
|
||||
This is called before the Peer has been removed from the
|
||||
Connection's peer container.
|
||||
*/
|
||||
virtual void deletingPeer(Peer *peer, bool timeout) = 0;
|
||||
virtual void deletingPeer(IPeer *peer, bool timeout) = 0;
|
||||
};
|
||||
|
||||
enum PeerChangeType : u8
|
||||
|
Reference in New Issue
Block a user