Kitura-NIO is a SwiftNIO based networking library for Kitura. Other than an additive change to the HTTPServer API around IPv6 support, Kitura-NIO adopts the same API as KituraNet, making the transition to using the NIO port almost seamless. While Kitura-NIO shares some code with Kitura-Net, the core comprising of HTTPServer, ClientRequest/ClientResponse and TLS support have been implemented using SwiftNIO.
We expect most of our users to require higher level concepts such as routing, templates and middleware, these are not provided in Kitura-NIO, if you want to use those facilities you should be coding at the Kitura level, for this please see the Kitura project. Kitura-NIO, like Kitura-net, underpins Kitura which offers a higher abstraction level to users.
Kitura-NIO works with Swift 4.1. It is also being tested with the development binaries for Swift 4.2.
- Port Listening
- HTTP Server support (request and response)
To test your Kitura app with the very early version of the Kitura-NIO networking framework, all you need to do is point to the kitura-nio branch from your
dependencies: [ // Dependencies declare other packages that this package depends on. .package(url: "https://github.com/IBM-Swift/Kitura", .branch("kitura-nio")), ],
Kitura will then use Kitura-NIO instead of Kitura-net for, networking.
Visit www.kitura.io for reference documentation.
Contributing to Kitura-NIO
We'd be more than happy to receive bug reports, enhancement requests and pull requests!
- Clone this repository.
$ git clone https://github.com/IBM-Swift/Kitura-NIO && cd Kitura-NIO
- Build and run tests.
$ swift test
In some Linux environments, this issue may be experienced.
These are early days for Kitura-NIO. We'd really love to hear feedback from you.
This library is licensed under Apache 2.0. Full license text is available in LICENSE.