Skip to content

Commit 4192c7f

Browse files
committed
use different approach to sending websocket events
1 parent ab6dc86 commit 4192c7f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
22
kotlin = "2.1.10"
3-
ktor = "3.0.3"
3+
ktor = "3.1.0"
44

55
[libraries]
66
kotlinGradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }

server/src/main/kotlin/Server.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ fun main() {
2929
LOG.debug { "GOT FRAME: $frame" }
3030

3131
if (frame is Frame.Text) {
32-
LOG.debug { "Got frame text: ${frame.readText()}" }
32+
val text = frame.readText()
33+
LOG.debug { "Got frame text: $text" }
3334

34-
val copy = Frame.Text(frame.fin, frame.data)
3535
sessions.forEach {
36-
it.send(copy)
36+
it.send(text)
3737
}
3838
}
3939
}

0 commit comments

Comments
 (0)