Kitura

public class Kitura
  • Add an HTTPServer on a port with a delegate.

    The server is only registered with the framework, it does not start listening on the port until Kitura.run() is called.

    Parameter

    Parameter onPort: The port to listen on.

    Parameter

    Parameter with: The ServerDelegate to use.

    Returns

    The created HTTPServer.

    Declaration

    Swift

    public class func addHTTPServer(onPort port: Int, with delegate: ServerDelegate) -> HTTPServer

    Parameters

    onPort

    The port to listen on.

    with

    The ServerDelegate to use.

    Return Value

    The created HTTPServer.

  • Add a FastCGIServer on a port with a delegate.

    The server is only registered with the framework, it does not start listening on the port until Kitura.run() is called.

    Parameter

    Parameter onPort: The port to listen on.

    Parameter

    Parameter with: The ServerDelegate to use.

  • Return: The created FastCGIServer.
  • Declaration

    Swift

    public class func addFastCGIServer(onPort port: Int, with delegate: ServerDelegate) -> FastCGIServer

    Parameters

    onPort

    The port to listen on.

    with

    The ServerDelegate to use.

  • Start the Kitura framework.

    Make all registered servers start listening on their port.

    Note

    This function never returns - it should be the last call in your main.swift

    Declaration

    Swift

    public class func run()