LE
lepicekmichal/SignalRKore
A Kotlin multiplatform coroutine-based SignalR client.
SignalRKore
Overview
SignalRKore is a Kotlin Multiplatform client library for ASP.NET Core SignalR. It enables real-time communication between clients and servers, allowing server-side code to push content to clients and vice-versa instantly.
Why should you use this library
| Official client library | SignalRKore | |
|---|---|---|
| Written in | Java | Kotlin |
| KMM / KMP | ✖️ | Android, JVM, iOS |
| Network | OkHttp only | Ktor |
| Async | RxJava | Coroutines |
| Serialization | Gson (non-customizable) | Kotlinx Serializable (customizable) |
| Streams | ✔️ | ✔️ |
| Transport fallback | ✖️ | ✖️ |
| Automatic reconnect | ✖️ | ✔️ |
| SSE | ✖️ | ✔️ |
| Connection status | ✖️ | ✔️ |
| Logging | SLF4J | Custom interface |
| MsgPack | ✔️ | ✖️ |
| Tested by time & community | ✔️ | ✖️ |
Quick Example
// Create a connection
val connection = HubConnectionBuilder.create("http://localhost:5000/chat")
// Start the connection
connection.start()
// Send a message to the server
connection.send("broadcastMessage", "User", "Hello, SignalR!")
// Receive messages from the server
connection.on("broadcastMessage", String.serializer(), String.serializer()).collect { (user, message) ->
println("$user says: $message")
}
// Don't forget to stop the connection when done
connection.stop()How to use
Please see the documentation.
Acknowledgments
All functionality was possible to implement only thanks to AzureSignalR ChatRoomLocal sample.
License
SignalRKore is released under the Apache 2.0 license.
TODO list
- Readme
- Documentation
- Add example project
- Fix up ServerSentEvents' http client
- Add logging
- Error handling
- Add tests
- Implement streams
- Extend to JVM
- Extend to iOS
- Implement transport fallback
- Implement automatic reconnect
- Reacting to stream invocation from server
On this page
Languages
Kotlin100.0%
Apache License 2.0
Created November 17, 2022
Updated March 15, 2026