AdamChlupacek on upgrade-to-fs3.0
Support for fs2 3.2.4 (compare)
AdamChlupacek on v0.4.0-M5
AdamChlupacek on 0.4-spinoco-compat
Setting version to 0.4.0-M5 Setting version to 0.4.0-SNAPSH… (compare)
AdamChlupacek on 0.4-spinoco-compat
Setting version to 0.4.0-M4 Fixed chunked encoding Merge pull request #45 from Spi… (compare)
pchlupacek on fix-chunked
Setting version to 0.4.0-M4 Fixed chunked encoding (compare)
submitToQueueViaWebSocket
below) and publishes those events to subscribers via WebSocket. I'm trying to create an integration test for this.
def createWebSocketStream: Stream[F, Unit] = ???
def submitToQueueViaWebSocket: F[Unit] = ???
def createShareAndQueue: F[String] = ???
def wscon(h: String, id: String) = for {
q <- Stream.eval(Queue.unbounded[F, String])
r <- Stream(q.dequeue.concurrently(createWebSocketStream))
} yield r
(for {
id <- Stream.eval(createShareAndQueue)
res0 <- wscon("localhost", id)
_ <- Stream.eval(submitToQueueViaWebSocket)
} yield res0).take(1).compile.toList
submitToQueueViaWebSocket
submits data that will end up in the queue which results in the q.dequeue
stream emitting an item, which in turn results in submitToQueueViaWebSocket
getting invoked turning it into an endless recursion. This seems to be ok as long as I only take a fixed amount of items from the stream. I've also tried changing wscon
to return a Stream[F, Stream[F, String]]
, but in that case the program doesn't terminate. Another approach I've tried is change wscon
to return a Stream[F, Stream[F, String]
instead of a Stream[F, String]
. This would help with the recursion, but for some reason I the initial item from the queue doesn't seems to get published via WS. The latter somehow feels like the better approach, but I can't figure out why the initial item doesn't get published.master
is not used at all
Hello team! I'm using WebSocket client, and have a question how I can check when WebSocket connection is closed? From documentation I have read:
* If this is established successfully, then this consults `pipe` to receive/sent any frames
* From/To server. Once the connection finishes, this will emit once None.
But I can't reproduce this behavior. I shut down the server, and never receive any messages.