Skip to content

Commit

Permalink
narf
Browse files Browse the repository at this point in the history
  • Loading branch information
rmgk committed Dec 13, 2024
1 parent e8be5af commit c14cc95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 6 additions & 3 deletions Modules/Channels/js/src/test/scala/EchoWSTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ class EchoWSTest extends munit.FunSuite {

test("echo") {

val outgoing = WebsocketConnect.connect("wss://echo.websocket.org/.ws").prepare: conn =>
TestUtil.printErrors { msg =>
println(s"received: ${new String(msg.asArray)}")
val outgoing = WebsocketConnect.connect("wss://echo.websocket.org/.ws").prepare { conn =>
{
case Success(msg) =>
println(s"received: ${new String(msg.asArray)}")
case Failure(ex) => ex.printStackTrace()
}
}

val fut = Async[Abort]:
val wsc = outgoing.bind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ package channels
import de.rmgk.delay.Callback

import java.io.IOException
import java.net.{InetAddress, InetSocketAddress, ServerSocket, SocketException}
import java.nio.channels.ClosedChannelException
import java.util.concurrent.{Executors, Semaphore}
import scala.concurrent.ExecutionContext
import scala.util.{Failure, Success}

object TestUtil {
Expand Down

0 comments on commit c14cc95

Please sign in to comment.