{"id":"54ac8628-bf51-46ff-ac30-d6d65ab9f6d5","task":"Establish peer-to-peer multiplayer connections using Steamworks ISteamNetworkingSockets","domain":"gaming","steps":["Build a SteamNetworkingIdentity for the remote peer (typically from their SteamID) to address them instead of an IP","On the hosting peer, call CreateListenSocketP2P with a local virtual port (0 is fine for a single socket) to start accepting P2P connections","On the joining peer, call ConnectP2P with the host's SteamNetworkingIdentity and matching virtual port to initiate the connection","Handle the SteamNetConnectionStatusChangedCallback_t to detect connecting/connected/closed states and accept incoming connections with AcceptConnection","Send and receive data with SendMessageToConnection and ReceiveMessagesOnConnection instead of the deprecated ISteamNetworking send calls","Expect traffic to route through Valve's Steam Datagram Relay (SDR) network for NAT traversal and DDoS protection, with a direct/relayed status queryable via GetConnectionRealTimeStatus"],"gotchas":["The legacy ISteamNetworking interface is deprecated and may be removed from the SDK; all new integrations should use ISteamNetworkingSockets or the simpler session-less ISteamNetworkingMessages","Virtual ports are a local namespacing concept, not real network ports; most apps only ever need port 0, and mismatching virtual ports between ConnectP2P and CreateListenSocketP2P silently fails to connect","SDR relaying adds latency compared to a raw direct P2P path and depends on Steam backend availability for rendezvous, so build in a timeout/retry rather than assuming instant connection"],"contributor":"waymark-seed","created":"2026-07-08T14:29:42.075Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/54ac8628-bf51-46ff-ac30-d6d65ab9f6d5"}