All Projects → Kitura → Kitura-NIO

Kitura / Kitura-NIO

Licence: Apache-2.0 license
A networking library for Kitura, based on SwiftNIO

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Kitura-NIO

Perfect-HTTPServer
HTTP server for Perfect.
Stars: ✭ 104 (+197.14%)
Mutual labels:  server-side-swift, httpserver
Perfect-HTTP
Base HTTP Support for Perfect.
Stars: ✭ 29 (-17.14%)
Mutual labels:  server-side-swift, httpserver
now-swift-example
Example for use Kitura framework and swift lang with https://zeit.co/now.
Stars: ✭ 18 (-48.57%)
Mutual labels:  server-side-swift, kitura
Kitura
A Swift web framework and HTTP server.
Stars: ✭ 7,533 (+21422.86%)
Mutual labels:  server-side-swift, kitura
SwiftMC
A Minecraft server and proxy written from scratch in Swift.
Stars: ✭ 22 (-37.14%)
Mutual labels:  server-side-swift
Http
🚀 Non-blocking, event-driven HTTP built on Swift NIO.
Stars: ✭ 220 (+528.57%)
Mutual labels:  server-side-swift
Mysql Kit
🐬 Pure Swift MySQL client built on non-blocking, event-driven sockets.
Stars: ✭ 159 (+354.29%)
Mutual labels:  server-side-swift
Zewo
Lightweight library for web server applications in Swift on macOS and Linux powered by coroutines.
Stars: ✭ 1,856 (+5202.86%)
Mutual labels:  server-side-swift
PassEncoder
Simple PassKit (Apple Wallet) encoding and signing in Swift.
Stars: ✭ 28 (-20%)
Mutual labels:  server-side-swift
awesome-swift-nio
📖 A collaborative list of all things Swift NIO
Stars: ✭ 81 (+131.43%)
Mutual labels:  server-side-swift
Telegrammer
Telegram Bot - written with Swift 5.2 / NIO, supports Linux, macOS
Stars: ✭ 248 (+608.57%)
Mutual labels:  server-side-swift
Perfecttemplate
Empty Perfect Starter Project.
Stars: ✭ 221 (+531.43%)
Mutual labels:  server-side-swift
MacroExpress
An unopinionated SwiftNIO based web framework, Express.js/Connect like.
Stars: ✭ 44 (+25.71%)
Mutual labels:  swiftnio
Onlineswiftplayground
Online Swift Playground
Stars: ✭ 192 (+448.57%)
Mutual labels:  server-side-swift
Perfect-WebSocketsServer
Perfect Example Module: WebSockets Server
Stars: ✭ 34 (-2.86%)
Mutual labels:  server-side-swift
Websocket Kit
WebSocket client library built on SwiftNIO
Stars: ✭ 155 (+342.86%)
Mutual labels:  server-side-swift
Mongo Swift Driver
The official MongoDB driver for Swift
Stars: ✭ 242 (+591.43%)
Mutual labels:  server-side-swift
Futures
Lightweight promises for iOS, macOS, tvOS, watchOS, and Linux
Stars: ✭ 59 (+68.57%)
Mutual labels:  server-side-swift
Hypertext
Any-way-you-want-it, type-safe HTML in Swift.
Stars: ✭ 236 (+574.29%)
Mutual labels:  server-side-swift
Htmlkit
A type-safe DSL that renders dynamic HTML templates in Swift
Stars: ✭ 229 (+554.29%)
Mutual labels:  server-side-swift

Kitura

Swift 5.0 APIDoc Build Status - Master macOS Linux Apache 2 Slack Status

Kitura-NIO

Kitura-NIO is a SwiftNIO based networking library for Kitura. Kitura-NIO adopts the same API as KituraNet, making the transition from KituraNet to Kitura-NIO 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. Kitura-NIO uses NIOSSL for TLS support.

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 2 has been tested with Swift 5. If you are using Swift 4, please use Kitura-NIO 1. See the release history for details.

Features

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

Using Kitura-NIO

With Kitura 2.5 and future releases, to run on top of Kitura-NIO (instead of Kitura-Net) all you need to do is set an environment variable called KITURA_NIO before building your Kitura application:

    export KITURA_NIO=1 && swift build

If you have already built your Kitura application using Kitura-Net and want to switch to using KITURA_NIO, you need to update the package before building:

    export KITURA_NIO=1 && swift package update && swift build

Using the environment variable we make sure that only one out of Kitura-NIO and Kitura-Net is linked into the final binary.

Please note that though Kitura-NIO has its own GitHub repository, the package name is KituraNet. This is because the Kitura-NIO and Kitura-Net are expected to provide identical APIs, and it makes sense if they share the package name too.

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/Kitura/Kitura-NIO && cd Kitura-NIO

  1. Build and run tests.

$ swift test

You may also want to run the tests in parallel: $ swift test --parallel

In some Linux environments, a low open file limit could cause test failures. See this.

Community

We'd really love to hear feedback from you.

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

License

This library is licensed under Apache 2.0. The full license text is available in LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].