We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSocketBuilder
http4s/server/shared/src/main/scala/org/http4s/server/websocket/WebSocketBuilder2.scala
Lines 76 to 77 in faf2436
Also, at least ember server is not including the close frame in the Stream of incoming frames /shrug
Stream
The text was updated successfully, but these errors were encountered:
Hello.
I confirm this, but only applies to http4s-ember-server, it works fine with Blaze
http4s-ember-server
Blaze
For example, a simple websocket that logs all income messages. I expect "close" control frames to also be printed out
EmberServerBuilder .default[IO] .withHost("0.0.0.0") .withPort(8080) .withHttpWebSocketApp { builder => HttpRoutes .of[IO] { case GET -> Root / "endpoint" => val inOut: Pipe[IO, WebSocketFrame, WebSocketFrame] = _.map { m => println(m.toString) m } builder.build(inOut) } .orNotFound } .build
You can run this server and test with https://websocketking.com/. Open a WS there and then close it... no printout.
All right, let's do the same with the Blazer server
BlazeServerBuilder[IO] .bindHttp("0.0.0.0", 8080) .withHttpWebSocketApp { builder => HttpRoutes .of[IO] { case GET -> Root / "endpoint" => val inOut: Pipe[IO, WebSocketFrame, WebSocketFrame] = _.map { m => println(m.toString) m } builder.build(inOut) } .orNotFound } .serve
Same test and yes, the close frame is received and printed out
Seems a bug in the new Ember server.
Sorry, something went wrong.
provide Close frame http4s#6806
9c644d1
No branches or pull requests
http4s/server/shared/src/main/scala/org/http4s/server/websocket/WebSocketBuilder2.scala
Lines 76 to 77 in faf2436
Also, at least ember server is not including the close frame in the
Stream
of incoming frames /shrugThe text was updated successfully, but these errors were encountered: