mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add support for IPv6
Two new configuration options are added: - "enable_ipv6" to enable/disable the overall use of IPv6 - "ipv6_server" to enable/disable the use of IPv6 sockets when running a server (when "enable_ipv6" is enabled)
This commit is contained in:
parent
309c5f3641
commit
f960c3be31
16 changed files with 475 additions and 209 deletions
|
@ -520,10 +520,12 @@ void Peer::reportRTT(float rtt)
|
|||
Connection
|
||||
*/
|
||||
|
||||
Connection::Connection(u32 protocol_id, u32 max_packet_size, float timeout):
|
||||
Connection::Connection(u32 protocol_id, u32 max_packet_size, float timeout,
|
||||
bool ipv6):
|
||||
m_protocol_id(protocol_id),
|
||||
m_max_packet_size(max_packet_size),
|
||||
m_timeout(timeout),
|
||||
m_socket(ipv6),
|
||||
m_peer_id(0),
|
||||
m_bc_peerhandler(NULL),
|
||||
m_bc_receive_timeout(0),
|
||||
|
@ -535,10 +537,11 @@ Connection::Connection(u32 protocol_id, u32 max_packet_size, float timeout):
|
|||
}
|
||||
|
||||
Connection::Connection(u32 protocol_id, u32 max_packet_size, float timeout,
|
||||
PeerHandler *peerhandler):
|
||||
bool ipv6, PeerHandler *peerhandler):
|
||||
m_protocol_id(protocol_id),
|
||||
m_max_packet_size(max_packet_size),
|
||||
m_timeout(timeout),
|
||||
m_socket(ipv6),
|
||||
m_peer_id(0),
|
||||
m_bc_peerhandler(peerhandler),
|
||||
m_bc_receive_timeout(0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue