Kowet

Enhances WebSocket functionality by adding support for the STOMP protocol, enabling seamless topic subscription and event handling for both Android and iOS applications.

Android
iOS
GitHub stars0
AuthorsColaGom
Dependents0
Creation dateover 4 years ago

Last activityabout 4 years ago
Latest release1.0.2-rc02 (over 4 years ago)

Kowet

Maven Central

KMM WebSocket support to STOMP protocol

STOMP?

Usage

Android

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)

iOS

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
}

Release

Groovy DSL

implementation 'io.github.colagom:kowet:{version}'

Kotlin DSL

implementation("io.github.colagom:kowet:{version}")
Android
iOS
GitHub stars0
AuthorsColaGom
Dependents0
Creation dateover 4 years ago

Last activityabout 4 years ago
Latest release1.0.2-rc02 (over 4 years ago)

Kowet

Maven Central

KMM WebSocket support to STOMP protocol

STOMP?

Usage

Android

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)

iOS

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
}

Release

Groovy DSL

implementation 'io.github.colagom:kowet:{version}'

Kotlin DSL

implementation("io.github.colagom:kowet:{version}")