HTTPServing
public protocol HTTPServing : class
Definition of an HTTP server.
-
Start the HTTP server on the given
port, usinghandlerto process incoming requestsDeclaration
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
View on GitHub
HTTPServing Protocol Reference