Skip to content

No way to send continuous WebSocketFrame with Fs2 stream pipes #1465

@sguillaume-ledger

Description

@sguillaume-ledger

Hi,

I'm using sttp with tapir/http4s/fs2 to build a websocket server.
My websocket endpoint is described with tapir as:

  val instance = endpoint.get
    .in(PREFIX)
    .out(webSocketBodyRaw(Fs2Streams[IO]))

and my business logic returns a fs2.Pipe[IO, WebSocketFrame, WebSocketFrame]

I have an use case when I would like to send a continuous WebSocketFrame (ie make a stream emit a continuous WebSocketFrame)
which I can't since WebSocketFrame exposes the finalFragment parameter only, not the isContinuation one

isContinuation is exposed in sttp.ws.WebSocket#send which is called by sttp.client3.impl.fs2.Fs2WebSockets#handleThroughPipe
with isContinuation always set to false.

Would that be possible to somehow expose the isContinuation flag when using the web socket with stream pipes ?

Thanks !

Regards,
Sebastien

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions