Kowet
1.0.2-rc02indexedEnhances WebSocket functionality by adding support for the STOMP protocol, enabling seamless topic subscription and event handling for both Android and iOS applications.
0
Stars
—
Used by
dependents
—
Health
/ 100
Enhances WebSocket functionality by adding support for the STOMP protocol, enabling seamless topic subscription and event handling for both Android and iOS applications.
KMM WebSocket support to STOMP protocol
val ws = WebSocketFactory.create("ws://10.0.2.2:8081/connect/websocket")
// create session
val session = Stomp.over(
ws,
scope = lifecycleScope
)
// subscribe topic
session.subscribe("topic", "1")
session.events.onEach {
//TODO: handle event
}.launchIn(lifecycleScope)
let ws = WebSocketFactory_.shared.create(url: "ws://localhost:8081/connect/websocket")
//create session
let wrapper = SocketHelperKt.stomp(webSocket: ws)
//subscribe topic
wrapper.subscribe(destination: "topic")
wrapper.watch { event in
// handle event
}
implementation 'io.github.colagom:kowet:{version}'
implementation("io.github.colagom:kowet:{version}")
Surfaced from shared tags and platforms — no rankings paid for.