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
7namespace con
8{
9
10class IPeer;
11
13{
14public:
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}
Definition connection.h:34
Definition peerhandler.h:13
virtual ~PeerHandler()=default
PeerHandler()=default
virtual void peerAdded(IPeer *peer)=0
virtual void deletingPeer(IPeer *peer, bool timeout)=0
Definition client.h:59