working main menu

This commit is contained in:
2024-08-07 11:54:09 +02:00
parent adb6dce08a
commit de6742f64d
19 changed files with 405 additions and 17 deletions

View File

@@ -4,7 +4,7 @@ namespace blitz {
namespace network {
EnetClient::EnetClient(const Nz::IpAddress& address) : m_Running(true) {
m_Host.Create(Nz::IpAddress::LoopbackIpV4, 1);
m_Host.Create(address.GetProtocol() == Nz::NetProtocol::IPv4 ? Nz::IpAddress::LoopbackIpV4 : Nz::IpAddress::LoopbackIpV6, 1);
m_Peer = m_Host.Connect(address);
m_Thread = std::jthread(&EnetClient::WorkerThread, this);
m_Connection.SetPeer(m_Peer);