Swiftpack.co - Package - IBM-Swift/Kitura-NIO

Kitura

Docs Build Status - Master macOS Linux Apache 2 Slack Status

Kitura-NIO

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 utilises SwiftNIO and NIOOpenSSL.

As of today, Kitura-NIO has been tested with Swift 4.1 only.

Features

  • Port Listening
  • HTTP Server support (request and response)

Using Kitura-NIO

To test your Kitura app with the very eary version of the Kitura-NIO networking framework, all you need to do is point to the kitura-nio branch from your Package.swift:

    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.

Getting Started

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!

  1. Clone this repository.

$ git clone https://github.com/IBM-Swift/Kitura-NIO && cd Kitura-NIO

  1. Set the open file limit to a large number. This is to work around an open issue.

$ ulimit -n 65536

  1. Build and run tests.

$ swift test

Community

These are early days for Kitura-NIO. We'd really love to hear feedback from you.

Join the Kitura on Swift Forums or our Slack to meet the team!

Github

link
Stars: 6
Help us keep the lights on

Used By

Total: 0