mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +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
|
@ -392,8 +392,7 @@ void Client::connect(const Address &address, const std::string &address_name,
|
|||
}
|
||||
|
||||
m_address_name = address_name;
|
||||
m_con.reset(new con::Connection(PROTOCOL_ID, 512, CONNECTION_TIMEOUT,
|
||||
address.isIPv6(), this));
|
||||
m_con.reset(con::createMTP(CONNECTION_TIMEOUT, address.isIPv6(), this));
|
||||
|
||||
infostream << "Connecting to server at ";
|
||||
address.print(infostream);
|
||||
|
@ -866,13 +865,13 @@ bool Client::loadMedia(const std::string &data, const std::string &filename,
|
|||
}
|
||||
|
||||
// Virtual methods from con::PeerHandler
|
||||
void Client::peerAdded(con::Peer *peer)
|
||||
void Client::peerAdded(con::IPeer *peer)
|
||||
{
|
||||
infostream << "Client::peerAdded(): peer->id="
|
||||
<< peer->id << std::endl;
|
||||
}
|
||||
|
||||
void Client::deletingPeer(con::Peer *peer, bool timeout)
|
||||
void Client::deletingPeer(con::IPeer *peer, bool timeout)
|
||||
{
|
||||
infostream << "Client::deletingPeer(): "
|
||||
"Server Peer is getting deleted "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue