Skip to content

Commit

Permalink
Mention streaming in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kciesielski committed Jul 15, 2023
1 parent 305253b commit 24e64e7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doc/server/netty.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ To expose an endpoint using a [Netty](https://netty.io)-based server, first add

Then, use:

* `NettyFutureServer().addEndpoints` to expose `Future`-based server endpoints.
* `NettyCatsServer().addEndpoints` to expose `F`-based server endpoints, where `F` is any cats-effect supported effect.
* `NettyZioServer().addEndpoints` to expose `ZIO`-based server endpoints, where `R` represents ZIO requirements supported effect.
- `NettyFutureServer().addEndpoints` to expose `Future`-based server endpoints.
- `NettyCatsServer().addEndpoints` to expose `F`-based server endpoints, where `F` is any cats-effect supported effect. [Streaming](../endpoint/streaming.md) request and response body is supported with fs2.
- `NettyZioServer().addEndpoints` to expose `ZIO`-based server endpoints, where `R` represents ZIO requirements supported effect.

These methods require a single, or a list of `ServerEndpoint`s, which can be created by adding [server logic](logic.md)
These methods require a single, or a list of `ServerEndpoint`s, which can be created by adding [server logic](logic.md)
to an endpoint.

For example:
Expand All @@ -36,7 +36,7 @@ val helloWorld = endpoint
.out(stringBody)
.serverLogic(name => Future.successful[Either[Unit, String]](Right(s"Hello, $name!")))

val binding: Future[NettyFutureServerBinding] =
val binding: Future[NettyFutureServerBinding] =
NettyFutureServer().addEndpoint(helloWorld).start()
```

Expand Down Expand Up @@ -83,4 +83,4 @@ val serverBinding: Future[NettyFutureDomainSocketBinding] =
Future.successful[Either[Unit, String]](Right(s"Hello, $name!")))
)
.startUsingDomainSocket(Paths.get(System.getProperty("java.io.tmpdir"), "hello"))
```
```

0 comments on commit 24e64e7

Please sign in to comment.