{"id":13446401,"url":"https://github.com/ValveSoftware/GameNetworkingSockets","last_synced_at":"2025-03-21T06:31:19.314Z","repository":{"id":39615297,"uuid":"126225160","full_name":"ValveSoftware/GameNetworkingSockets","owner":"ValveSoftware","description":"Reliable \u0026 unreliable messages over UDP.  Robust message fragmentation \u0026 reassembly.  P2P networking / NAT traversal.  Encryption.","archived":false,"fork":false,"pushed_at":"2024-09-30T16:34:18.000Z","size":15982,"stargazers_count":8353,"open_issues_count":48,"forks_count":630,"subscribers_count":290,"default_branch":"master","last_synced_at":"2024-12-28T11:15:22.151Z","etag":null,"topics":["game-development","networking","peer-to-peer","realtime-messaging","reliable-messages"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ValveSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-21T18:43:20.000Z","updated_at":"2024-12-28T10:11:17.000Z","dependencies_parsed_at":"2023-02-02T18:45:38.789Z","dependency_job_id":"a141ebb6-2a8c-43a8-8ca9-3aa87efe51c9","html_url":"https://github.com/ValveSoftware/GameNetworkingSockets","commit_stats":{"total_commits":1320,"total_committers":44,"mean_commits":30.0,"dds":0.2893939393939394,"last_synced_commit":"de03d74226eb3b9a299e05f5fff93965d3dce2d9"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValveSoftware%2FGameNetworkingSockets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValveSoftware%2FGameNetworkingSockets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValveSoftware%2FGameNetworkingSockets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ValveSoftware%2FGameNetworkingSockets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ValveSoftware","download_url":"https://codeload.github.com/ValveSoftware/GameNetworkingSockets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244257252,"owners_count":20424131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-development","networking","peer-to-peer","realtime-messaging","reliable-messages"],"created_at":"2024-07-31T05:00:52.732Z","updated_at":"2025-03-21T06:31:19.293Z","avatar_url":"https://github.com/ValveSoftware.png","language":"C++","readme":"# GameNetworkingSockets\n[![Windows, Ubuntu](https://github.com/ValveSoftware/GameNetworkingSockets/actions/workflows/build.yml/badge.svg)](https://github.com/ValveSoftware/GameNetworkingSockets/actions)  [![MacOS](https://github.com/ValveSoftware/GameNetworkingSockets/actions/workflows/macos.yml/badge.svg)](https://github.com/ValveSoftware/GameNetworkingSockets/actions) [![Linux flavors](https://github.com/ValveSoftware/GameNetworkingSockets/actions/workflows/linux-flavors.yml/badge.svg)](https://github.com/ValveSoftware/GameNetworkingSockets/actions)\n\nGameNetworkingSockets is a basic transport layer for games.  The features are:\n\n* Connection-oriented API (like TCP)\n* ... but message-oriented (like UDP), not stream-oriented.\n* Supports both reliable and unreliable message types\n* Messages can be larger than underlying MTU.  The protocol performs\n  fragmentation, reassembly, and retransmission for reliable messages.\n* A [reliability layer](src/steamnetworkingsockets/clientlib/SNP_WIRE_FORMAT.md)\n  significantly more sophisticated than a basic TCP-style sliding window.\n  It is based on the \"ack vector\" model from DCCP (RFC 4340, section 11.4)\n  and Google QUIC and discussed in the context of games by\n  [Glenn Fiedler](https://gafferongames.com/post/reliable_ordered_messages/).\n  The basic idea is for the receiver to efficiently communicate to the sender\n  the status of every packet number (whether or not a packet was received\n  with that number).  By remembering which segments were sent in each packet,\n  the sender can deduce which segments need to be retransmitted.\n* Encryption. AES-GCM-256 per packet, [Curve25519](https://cr.yp.to/ecdh.html) for\n  key exchange and cert signatures. The details for shared key derivation and\n  per-packet IV are based on the [design](https://docs.google.com/document/d/1g5nIXAIkN_Y-7XJW5K45IblHd_L2f5LTaDUDwvZ5L6g/edit?usp=sharing)\n  used by Google's QUIC protocol.\n* Tools for simulating packet latency/loss, and detailed stats measurement\n* Head-of-line blocking control and bandwidth sharing of multiple message\n  streams (\"lanes\") on the same connection.  You can use strict priority\n  values, softer [weight values](https://en.wikipedia.org/wiki/Weighted_fair_queueing)\n  that control how bandwidth is shared, or some combination of the two methods.\n  See [``ISteamNetworkingSockets::ConfigureConnectionLanes``](include/steam/isteamnetworkingsockets.h).\n* IPv6 support\n* Peer-to-peer networking:\n  * NAT traversal through google WebRTC's ICE implementation.\n  * Plug in your own signaling service.\n  * Unique \"symmetric connect\" mode.\n  * [``ISteamNetworkingMessages``](include/steam/isteamnetworkingmessages.h) is an\n    interface designed to make it easy to port UDP-based code to P2P use cases.  (By\n    UDP-based, we mean non-connection-oriented code, where each time you send a\n    packet, you specify the recipient's address.)\n  * See [README_P2P.md](README_P2P.md) for more info\n* Cross platform.  This library has shipped on consoles, mobile platforms, and non-Steam\n  stores, and has been used to facilitate cross-platform connectivity.  Contact us to get\n  access to the code.  (We are not allowed to distribute it here.)\n\nWhat it does *not* do:\n\n* Higher level serialization of entities, delta encoding of changed state\n  variables, etc\n* Compression\n\n## Quick API overview\n\nTo get an idea of what the API is like, here are a few things to check out:\n\n* The [include/steam](include/steam) folder has the public API headers.\n  * [``ISteamNetworkingSockets``](include/steam/isteamnetworkingsockets.h) is the\n    most important interface.\n  * [``steamnetworkingtypes.h``](include/steam/steamnetworkingtypes.h) has misc\n    types and declarations.\n* The\n  [Steamworks SDK documentation](https://partner.steamgames.com/doc/api/ISteamNetworkingSockets)\n  offers web-based documentation for these APIs.  Note that some features\n  are only available on Steam, such as Steam's authentication service,\n  signaling service, and the SDR relay service.\n* Look at these examples:\n  * [example_chat.cpp](examples/example_chat.cpp).  Very simple client/server\n    program using all reliable messages over ordinary IPv4.\n  * [test_p2p.cpp](tests/test_p2p.cpp).  Shows how to get two hosts to connect\n    to each other using P2P connectivity.  Also an example of how to write a\n    signaling service plugin.\n\n## Building\n\nSee [BUILDING](BUILDING.md) for more information.\n\n## Language bindings\n\nThe library was written in C++, but there is also a plain C interface\nto facilitate binding to other languages.\n\nThird party language bindings:\n\n* C#:\n  * \u003chttps://github.com/nxrighthere/ValveSockets-CSharp\u003e\n  * \u003chttps://github.com/Facepunch/Facepunch.Steamworks\u003e\n* Go:\n  * \u003chttps://github.com/nielsAD/gns/\u003e\n* Rust:\n  * \u003chttps://github.com/hussein-aitlahcen/gns-rs\u003e\n\n## Why do I see \"Steam\" everywhere?\n\nThe main interface class is named SteamNetworkingSockets, and many files have\n\"steam\" in their name.  But *Steam is not needed*.  If you don't make games or\naren't on Steam, feel free to use this code for whatever purpose you want.\n\nThe reason for \"Steam\" in the names is that this provides a subset of the\nfunctionality of the [API](https://partner.steamgames.com/doc/api/ISteamNetworkingSockets)\nwith the same name in the Steamworks SDK.  Our main\nreason for releasing this code is so that developers won't have any hesitation\ncoding to the API in the Steamworks SDK.  On Steam, you will link against the\nSteamworks version, and you can access the additional services provided by\nthe [Steam Datagram Relay](https://partner.steamgames.com/doc/features/multiplayer/steamdatagramrelay)\nnetwork.  On other platforms and stores, as long as you ship a version of your\ngame on Steam, you might be able to take advantage of these services.  See\nthe Steamworks documentation for more information.  Because this is a live\nservice, and we need to control our security and backward compatibility burden,\nat this time we are not able to offer access to SDR on other platforms to all\npartners.\n\nIf you aren't a Steam partner, or don't have a version of your game on Steam,\nthen use this opensource version of the API and take advantage of the permissive\nlicense to do whatever you want.  We want you to take maximum advantage of the\nfeatures in the Steamworks version.  That won't happen if this API is a weird\n\"wart\" that's hidden behind `#ifdef STEAM`, which is why we're making this\nopensource version available.\n\nThe desire to match the Steamworks SDK also explains a somewhat anachronistic\ncoding style and weird directory layout.  This project is kept in sync with the\nSteam code here at Valve.  When we extracted the code from the much larger\ncodebase, we had to do some relatively gross hackery.  The files in folders\nnamed  `tier0`, `tier1`, `vstdlib`, `common`, etc have especially suffered\ntrauma.  Also if you see code that appears to have unnecessary layers of\nabstraction, it's probably because those layers are needed to support relayed\nconnection types or some part of the Steamworks SDK.\n\n## Security\n\nDid you find a security vulnerability?  Please inform us responsibly; you may\nbe eligible for a bug bounty.  See the [security policy](SECURITY.md) for more\ninformation.\n","funding_links":[],"categories":["C++","Networking","NetWork","Libraries \u0026 Frameworks:","Libraries"],"sub_categories":["C/C++","C++"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FValveSoftware%2FGameNetworkingSockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FValveSoftware%2FGameNetworkingSockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FValveSoftware%2FGameNetworkingSockets/lists"}