WuKongEasySDK
Choose a platform and exchange your first online messages with a pinned SDK version.
WuKongEasySDK provides lightweight connection, online messaging, and event APIs. Your application owns the backend and UI; the SDK authenticates with WebSocket JSON-RPC CONNECT and exchanges messages. Choose a platform below. Use the official examples to prepare a server and test accounts.
Choose a platform and send the first message
iOS
1.1.1 · Swift / iOS 15+
Android
1.0.5 · Kotlin / API 21+
Flutter
1.1.0 · Dart 3+ / Flutter 3+
Web
2.0.5 · TypeScript / WebSocket
Rust
0.1.0 · Rust 1.86+ / Tokio
C#
1.0.0 · .NET 8+
C++
0.1.0 · C++17 / CMake 3.20+
Python
0.1.0 · Python 3.11+ / asyncio
Does it fit your application?
| Choose EasySDK when you only need | Choose the full WuKongIMSDK when you also need |
|---|---|
| WebSocket connection and automatic reconnect | A local message database and offline recovery |
| Online messages in person or group Channels | Conversations, unread counts, and message synchronization |
| Send results and realtime message events | Push, multi-device behavior, and the broader platform API |
| Product-owned UI, persistence, and receipts | More client message state owned by the SDK |
EasySDK is neither a chat UI nor a complete product backend. A successful send means the server returned a send result; it does not mean the peer received, displayed, or processed the message. If you need the broader feature set, return to SDK selection.
Rust uses one Client per identity; clones share the socket. subscribe() returns a bounded receiver, disconnect().await permits later connection, and destroy().await closes permanently. The default device category is PC 2. See the Rust quickstart for installation and lifecycle.
Three concepts to start with
Channel is the message destination. A person message targets the other user’s UID; a group message targets a group ID created by your backend.
Payload is your application’s JSON content, such as {"type":1,"content":"Hello"}. Received content belongs in your UI or application handler.
Send result is the server’s processing result. It differs from recipient delivery and a read receipt. Check both the sender’s result and the recipient’s event during your first integration.
Prepare connection credentials
The client must not create its own identity or call Product HTTP management routes. After product login, the trusted backend returns the minimum connection material over HTTPS:
{
"uid": "alice",
"token": "short-lived-token",
"websocketUrl": "wss://im.example.com/ws"
}| Field | Owner and constraint |
|---|---|
uid | Stable user identity confirmed by the product backend; Alice and Bob use different values |
token | Short-lived and revocable, scoped to this identity's connection, with no Product HTTP management authority |
websocketUrl | Selected by the backend from deployment configuration or a trusted routing result; production uses wss:// |
Complete Authentication & Tokens first. The default composition exactly matches each CONNECT token against the /user/token record for the same UID and device category. Your deployment must still protect that route, implement expiry and rotation policy, and prove that invalid, revoked, and product-expired tokens are rejected.
Run Alice and Bob
All platforms follow the same minimal path:
- Obtain separate
uid, short-livedtoken, andwebsocketUrlvalues for Alice and Bob. - Create the clients in two independent devices, processes, or browser contexts by following the platform quickstart.
- After both sides report a successful connection, have Alice send a text JSON payload to the person Channel
bob. - Retain Alice's send result; on Bob, verify
fromUid, the Channel, and the payload in the realtime message event. - Send from Bob to Alice and prove the reverse direction.
- Leave the page or sign out, remove listeners, and disconnect; confirm there is no duplicate event or background connection.
This loop verifies online messaging only. Send acknowledgement, realtime receipt, and product completion are three different states; model them with Messaging.
To validate the environment first, follow Run the Official Examples with the verified server and client revisions before moving tutorial code into your application.
Release resources on exit
| Platform | Subscribe and unsubscribe | Connection owner exit |
|---|---|---|
| iOS | onMessage / removeListener | disconnect() |
| Android | addEventListener / removeEventListener | disconnect() |
| Flutter | addEventListener / removeEventListener | disconnect() + dispose() |
| Web | on / off | destroy() |
| Rust | subscribe() / drop receiver | destroy().await |
| C# | += / -= | await using / DisposeAsync() |
| C++ | on / off(listenerId) | destroy().get() |
| Python | on / off | async with / await destroy() |
An application object usually owns the connection. Pages remove their own subscriptions; account logout releases the connection. Follow each platform’s singleton, threading, and reconnect rules.
Versions and compatibility
| Platform | Tutorial version | Distribution |
|---|---|---|
| iOS | 1.1.1 | Swift Package Manager / CocoaPods |
| Android | 1.0.5 | Maven Central |
| Flutter | 1.1.0 | pub.dev |
| Web | 2.0.5 | npm |
| Rust | 0.1.0 | crates.io |
| C# | 1.0.0 | NuGet |
| C++ | 0.1.0 | vcpkg / ZIP |
| Python | 0.1.0 | PyPI |
Tutorials pin the versions above for reproducibility and troubleshooting. Web 2.0.5 includes a handshake-failure reconnect repair; see its release notes. C++ uses the WuKongIM custom registry or a prebuilt archive matching your system.
The first task is online bidirectional messaging. Reconnect does not fetch offline history or automatically select another node. Cluster recovery and membership updates also depend on the server version. Exact historical environments, passing results, and failures remain in engineering validation records.
Next
Run an official example → follow your platform tutorial → check both message directions → use production checks for actual devices, WSS, Token rotation, and recovery.