HTTPServing

public protocol HTTPServing : class

Definition of an HTTP server.

  • Start the HTTP server on the given port, using handler to process incoming requests

    Declaration

    Swift

    func start(port: Int, handler: @escaping HTTPRequestHandler) throws
  • Stop the server

    Declaration

    Swift

    func stop()
  • The port the server is listening on

    Declaration

    Swift

    var port: Int
  • The number of current connections

    Declaration

    Swift

    var connectionCount: Int