ZIO-NIO is a ZIO wrapper on Java NIO. It comes in two flavours:
zio.nio.core- a small and unopionanted ZIO interface to NIO that just wraps NIO API in ZIO effects,
zio.nio- an opinionated interface with deeper ZIO integration that provides more type and resource safety.
A very simple example of these differences would be the signature of
apply method on
//zio.nio.core def apply(): IO[Exception, AsynchronousSocketChannel]
//zio.nio def apply(): Managed[Exception, AsynchronousSocketChannel]
ZIO-NIO is available via maven repo. Add this to your dependencies in
libraryDependencies += "dev.zio" %% "zio-nio-core" % "1.0.0-RC6"
libraryDependencies += "dev.zio" %% "zio-nio" % "1.0.0-RC6"
- File Channel — For processing files that are available locally. For every operation a new fiber is started to perform operation
- Socket Channel — Provides API for remote communication with