From 88d0cb130c3f2b30f53198e95e0a023d91328ff1 Mon Sep 17 00:00:00 2001 From: Bromel777 Date: Fri, 1 Apr 2022 03:35:41 +0300 Subject: [PATCH] wip --- .../ergolabs/cardano/explorer/api/untitled.sc | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 modules/api/src/main/scala/io/ergolabs/cardano/explorer/api/untitled.sc diff --git a/modules/api/src/main/scala/io/ergolabs/cardano/explorer/api/untitled.sc b/modules/api/src/main/scala/io/ergolabs/cardano/explorer/api/untitled.sc deleted file mode 100644 index 9af8150..0000000 --- a/modules/api/src/main/scala/io/ergolabs/cardano/explorer/api/untitled.sc +++ /dev/null @@ -1,35 +0,0 @@ -//import monix.eval.Task -//import sttp.capabilities.WebSockets -//import sttp.capabilities.monix.MonixStreams -//import sttp.client3._ -//import sttp.client3.asynchttpclient.monix.AsyncHttpClientMonixBackend -//import sttp.client3.testing.SttpBackendStub -//import sttp.model.StatusCode -//import sttp.ws.{WebSocket, WebSocketFrame} -//import sttp.ws.testing.WebSocketStub -// -//def useWebSocket(ws: WebSocket[Task]): Task[Unit] = { -// val response = """{ -// | "type": "jsonwsp/request", -// | "version": "1.0", -// | "servicename": "ogmios", -// | "methodname": "Query", -// | "args": { "query": "eraSummaries" } -// |}""".stripMargin -// def send(i: Int) = ws.sendBinary(response.getBytes()) -// val receive = ws.receiveText().flatMap(t => Task(println(s"RECEIVED [$t]"))) -// send(1) *> send(2) *> receive *> receive -//} -// -//// the request description -//def openWebSocket(backend: SttpBackend[Task, WebSockets]): Task[Unit] = { -// basicRequest -// .response(asWebSocket(useWebSocket)) -// .get(uri"ws://136.243.21.170:1337") -// .send(backend) -// .void -//} -// -//import monix.execution.Scheduler.Implicits.global -// -//AsyncHttpClientMonixBackend().flatMap(back => openWebSocket(back)).runSyncUnsafe()