SDKs

SDKs

Konet provides first-party SDKs for Go, JavaScript/TypeScript, React Native and Python.

All SDKs share the same mental model:

  1. Connect — open a WebSocket with a JWT token
  2. Channel — join a topic like room:lobby
  3. Subscribe — start receiving events
  4. 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

OperationJavaScriptGoPython
ConnectcreateClient(url, opts)konet.New(url, token) + client.Connect(ctx)KonetClient(url, token=...) + await client.connect()
Channelclient.channel("room:lobby")client.Channel("room:lobby")client.channel("room:lobby")
Subscribeawait channel.subscribe()ch.Subscribe(ctx)await channel.subscribe()
Sendchannel.send(event, payload)ch.Send(event, payload)await channel.send(event, payload)
Listenchannel.on(event, handler)ch.On(event, handler)channel.on(event, handler)
Unsubscribeawait channel.unsubscribe()ch.Unsubscribe()await channel.unsubscribe()
Disconnectclient.disconnect()c.Disconnect()await client.disconnect()

Feature Support

FeatureJavaScriptReact NativeGoPython
Channels & broadcast
Auto-reconnect & re-join
Presence helperraw eventsraw events
History replay
Binary frames
Floor control
Lifecycle recoverycheckConnection()automatic

"raw events" means the SDK delivers presence_state / presence_diff to your own handler instead of merging them for you — see Presence.