Repository navigation
examples: Add LAN discovery beacon and server browser (Issue #82) - #448
Open
sashakosti wants to merge 2 commits into
Open
sashakosti wants to merge 2 commits into
sashakosti wants to merge 2 commits into
Conversation
…e_chat - Implements lightweight UDP-based discovery beacon (CLanDiscoveryBeacon) and client utility (CLanDiscoveryClient) on port 27015. - example_chat server advertises its listen port and responds to discovery queries. - example_chat client auto-discovers and connects to the local server when no address argument is provided. - Responds to mobile/external GNS_PING probes with GNS_PONG. Closes ValveSoftware#82
…dress ranking - Eliminate double-close and cross-thread socket data race in beacon teardown. - Retransmit discovery query every 500ms to tolerate packet loss on wireless LANs. - Prioritize routable physical LAN interfaces over internal container bridges. - Add ScopedWinsockInit guard on Windows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #82.
Adds a lightweight, self-contained UDP broadcast discovery module for finding GameNetworkingSockets servers on the local area network.
Overview
examples/lan_discovery.h/lan_discovery.cpp:CLanBeacon: Background broadcaster announcing server availability, port, and game metadata.CLanBrowser: Active query/response client discovering local servers with query retries and address ranking (prefers routable LAN IPs over loopback/link-local).examples/example_chat.cpp:--lan-announce(host) and--lan-find(client auto-discovery and connection).ScopedWinsockInit_t,SO_BROADCAST).