SDKs
Konet provides first-party SDKs for Go, JavaScript/TypeScript, React Native and Python.
All SDKs share the same mental model:
- Connect — open a WebSocket with a JWT token
- Channel — join a topic like
room:lobby - Subscribe — start receiving events
- Send / Receive — broadcast and listen
Installation
React Native is a thin layer over the JavaScript core — same API, plus
AppState wiring. It is listed separately below only where it differs.
Common Interface
| Operation | JavaScript | Go | Python |
|---|---|---|---|
| Connect | createClient(url, opts) | konet.New(url, token) + client.Connect(ctx) | KonetClient(url, token=...) + await client.connect() |
| Channel | client.channel("room:lobby") | client.Channel("room:lobby") | client.channel("room:lobby") |
| Subscribe | await channel.subscribe() | ch.Subscribe(ctx) | await channel.subscribe() |
| Send | channel.send(event, payload) | ch.Send(event, payload) | await channel.send(event, payload) |
| Listen | channel.on(event, handler) | ch.On(event, handler) | channel.on(event, handler) |
| Unsubscribe | await channel.unsubscribe() | ch.Unsubscribe() | await channel.unsubscribe() |
| Disconnect | client.disconnect() | c.Disconnect() | await client.disconnect() |
Feature Support
| Feature | JavaScript | React Native | Go | Python |
|---|---|---|---|---|
| Channels & broadcast | ✅ | ✅ | ✅ | ✅ |
| Auto-reconnect & re-join | ✅ | ✅ | ✅ | ✅ |
| Presence helper | ✅ | ✅ | raw events | raw events |
| History replay | ✅ | ✅ | ✅ | ✅ |
| Binary frames | ✅ | ✅ | ✅ | ✅ |
| Floor control | ✅ | ✅ | ✅ | ✅ |
| Lifecycle recovery | checkConnection() | automatic | — | — |
"raw events" means the SDK delivers presence_state / presence_diff to your
own handler instead of merging them for you — see
Presence.