OverviewFilesCommitsIssuesDocsReleasesPeers

hyperswarm-peer commits / b906e0c

README: the TODO list was contradicted by 27 bound methods
The file argued with itself. The intro sold "NAT holepunching" while Current Status listed it under TODO, alongside "DHT-based peer discovery (currently requires knowing the server address)", "P2P mesh mode" and "Noise encryption". src/hyperswarm_peer.cpp binds 27 methods. join_dht, listen_on_dht, dht_put/get, dht_mutable_put/get, generate_dht_keypair, announce_topic, join_topic, leave_topic, lookup_topic, swarm_join/leave, swarm_join_peer/leave_peer, connect_to_peer, create_server_with_keypair, create_client_with_key, generate_keypair, get_peer_public_key. The README documented two of them -- create_server and create_client -- and described everything else as unbuilt. Replaced Current Status with the actual API surface grouped by function, and corrected "All 23 MultiplayerPeerExtension virtual methods" to 22, which is what is implemented. H1 was "HyperswarmMultiplayerPeer — Godot 4 GDExtension", a name plus an appended explainer; it is now the repo name with the class named beneath. Linked docs/PARITY-hyperswarm.md, which nothing pointed at, and added License. Verified and left alone: all 11 paths in Project Structure exist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
b906e0c4e5f90db7fb81645f51443832f50b3923
by plankatron <fleeky@gmail.com> · 2026-09-10T15:16:54.000Z

Changed files (1) +34 -18

README.md +34 -18
……@@ -1,6 +1,8 @@
1# HyperswarmMultiplayerPeer — Godot 4 GDExtension
1# hyperswarm-peer
22
3A C++ GDExtension that implements Godot's `MultiplayerPeerExtension` using [libudx](https://github.com/holepunchto/libudx) for P2P UDP networking. Sub-5ms latency, NAT holepunching, reliable + unreliable transfer modes — all as a drop-in replacement for ENet.
3`HyperswarmMultiplayerPeer` — a Godot 4 GDExtension.
4
5A C++ GDExtension that implements Godot's `MultiplayerPeerExtension` using [libudx](https://github.com/holepunchto/libudx) for P2P UDP networking. Reliable and unreliable transfer modes, DHT peer discovery and topic-based swarm join — a drop-in replacement for ENet.
46
57## Architecture
68
……@@ -55,11 +57,16 @@ var peer = HyperswarmMultiplayerPeer.new()
5557peer.create_server(9514)
5658multiplayer.multiplayer_peer = peer
5759
58# Join a game
60# Join a game by address
5961var peer = HyperswarmMultiplayerPeer.new()
6062peer.create_client("192.168.1.100", 9514)
6163multiplayer.multiplayer_peer = peer
6264
65# Or find each other over the DHT, with no address at all
66peer.join_dht()
67peer.announce_topic(topic) # host
68peer.lookup_topic(topic) # client, then connect_to_peer(...)
69
6370# All standard Godot multiplayer works:
6471multiplayer.peer_connected.connect(func(id): print("Peer joined: ", id))
6572
……@@ -114,18 +121,27 @@ hyperswarm-peer/
114121└── README.md
115122```
116123
117## Current Status
118
119**Working:**
120- All 23 MultiplayerPeerExtension virtual methods implemented
121- Server/client connection model
122- Three transfer modes (reliable, unreliable, unreliable ordered)
123- Background threaded UDX with thread-safe packet queues
124- Proper cleanup and disconnection
125
126**TODO:**
127- DHT-based peer discovery (currently requires knowing the server address)
128- NAT holepunching via HyperDHT
129- P2P mesh mode (`create_mesh()`)
130- Noise encryption (secret-stream integration)
131- Multi-platform builds (macOS, Windows)
124## API surface
125
12627 bound methods beyond the `MultiplayerPeerExtension` virtuals:
127
128| group | methods |
129|---|---|
130| connect | `create_server`, `create_client`, `create_server_with_keypair`, `create_client_with_key`, `connect_to_peer` |
131| DHT | `join_dht`, `listen_on_dht`, `get_dht_status`, `dht_put`, `dht_get`, `dht_mutable_put`, `dht_mutable_get`, `generate_dht_keypair` |
132| topics | `announce_topic`, `join_topic`, `leave_topic`, `lookup_topic` |
133| swarm | `swarm_join`, `swarm_leave`, `swarm_join_peer`, `swarm_leave_peer` |
134| keys | `generate_keypair`, `get_peer_public_key` |
135| diagnostics | `get_stats`, `get_peer_rtt`, `get_swarm_status`, `get_connection_diagnostics` |
136
13722 `MultiplayerPeerExtension` virtuals are implemented (`_poll`, `_put_packet`, `_get_packet`,
138the transfer-mode and channel accessors, `_disconnect_peer`, `_close`, …).
139
140## Documentation
141
142- [`docs/PARITY-hyperswarm.md`](docs/PARITY-hyperswarm.md) — where this extension stands
143 against the JS Hyperswarm stack.
144
145## License
146
147Not yet declared.