Luanti
5.10.0-dev
Loading...
Searching...
No Matches
peerhandler.h
Go to the documentation of this file.
1
// Luanti
2
// SPDX-License-Identifier: LGPL-2.1-or-later
3
// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5
#pragma once
6
7
namespace
con
8
{
9
10
class
IPeer;
11
12
class
PeerHandler
13
{
14
public
:
15
PeerHandler
() =
default
;
16
virtual
~PeerHandler
() =
default
;
17
18
// Note: all functions are called from within a Receive() call on the same thread.
19
20
/*
21
This is called after the Peer has been inserted into the
22
Connection's peer container.
23
*/
24
virtual
void
peerAdded
(
IPeer
*peer) = 0;
25
26
/*
27
This is called before the Peer has been removed from the
28
Connection's peer container.
29
*/
30
virtual
void
deletingPeer
(
IPeer
*peer,
bool
timeout) = 0;
31
};
32
33
}
con::IPeer
Definition
connection.h:34
con::PeerHandler
Definition
peerhandler.h:13
con::PeerHandler::~PeerHandler
virtual ~PeerHandler()=default
con::PeerHandler::PeerHandler
PeerHandler()=default
con::PeerHandler::peerAdded
virtual void peerAdded(IPeer *peer)=0
con::PeerHandler::deletingPeer
virtual void deletingPeer(IPeer *peer, bool timeout)=0
con
Definition
client.h:59
network
peerhandler.h
Generated on Fri Nov 1 2024 10:48:59 for Luanti by
1.11.0