This commit is contained in:
2025-11-13 15:12:00 +01:00
parent 5c8409b312
commit c85f622a60
7 changed files with 19 additions and 15 deletions

View File

@@ -13,7 +13,7 @@
namespace ColumnLynx::Net::UDP {
class UDPServer {
public:
UDPServer(asio::io_context& ioContext, uint16_t port, bool* hostRunning, bool ipv4Only = false, VirtualInterface* tun = nullptr)
UDPServer(asio::io_context& ioContext, uint16_t port, bool* hostRunning, bool ipv4Only = false, std::shared_ptr<VirtualInterface> tun = nullptr)
: mSocket(ioContext), mHostRunning(hostRunning), mTun(tun)
{
asio::error_code ec;
@@ -53,6 +53,6 @@ namespace ColumnLynx::Net::UDP {
asio::ip::udp::endpoint mRemoteEndpoint;
std::array<uint8_t, 2048> mRecvBuffer; // Adjust size as needed
bool* mHostRunning;
VirtualInterface* mTun;
std::shared_ptr<VirtualInterface> mTun;
};
}