ServerProtocol

public protocol ServerProtocol

Control methods for a server.

  • Starts the server.

    Declaration

    Swift

    func start() -> Result<Bool>

    Return Value

    Either .success(true), or .error(message: String) with the message detailing the kind of error that occured.

  • Stops the server.

    Note

    There are delays involved, the accept loop may still accept new requests until it loops around. Requests being processed will be allowed to continue normally.

    Declaration

    Swift

    func stop()