|
group2 0.1.0
CSE 125 Group 2
|
Direct UDP hole-punch assist for global joins. More...
#include <UdpSessionTransport.hpp>
Public Attributes | |
| std::string | directoryHost |
| Directory host to re-punch through. | |
| Uint16 | directoryPort = 0 |
| Directory UDP port. | |
| std::vector< std::uint8_t > | request |
| Pre-encoded PunchRequest envelope. | |
| bool | enabled = false |
Direct UDP hole-punch assist for global joins.
While the client connects, it periodically re-sends a directory PunchRequest from THIS session's game socket. That makes the directory record the game socket's NAT mapping (not the throwaway helper socket used to discover the server) and re-notify the host, so the host punches back to the port we actually game on. Without this, port-restricted / symmetric NATs have no pinhole for our ConnectionRequest and the join times out. The request bytes are an opaque pre-encoded directory-control envelope so the transport stays agnostic of the discovery wire format.
| std::string net::UdpSessionTransport::PunchAssist::directoryHost |
Directory host to re-punch through.
| Uint16 net::UdpSessionTransport::PunchAssist::directoryPort = 0 |
Directory UDP port.
| bool net::UdpSessionTransport::PunchAssist::enabled = false |
| std::vector<std::uint8_t> net::UdpSessionTransport::PunchAssist::request |
Pre-encoded PunchRequest envelope.