mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Move network protocol implementation behind an interface
This commit is contained in:
parent
c6ef5ab259
commit
7968ab6928
18 changed files with 2109 additions and 2054 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue