start(address:)
A default implementation for those servers that haven’t migrated yet
This declaration is deprecated: Implement an async version of this yourself
func start(address: BindAddress?) async throws
A default implementation for those servers that haven’t migrated yet
This declaration is deprecated: Implement an async version of this yourself
func start(address: BindAddress?) async throws
s5Vapor6ServerPAAE5start7addressyAA11BindAddressOSg_tYaKF
What are these?3O8O3
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
protocol Server : Sendable
enum BindAddress
func start(address: BindAddress?) throws
Start the server with the specified address.
func start(address: BindAddress?) async throws
Start the server with the specified address.
func start() throws
Start the server with its default configuration, listening over a regular TCP socket.
func shutdown() async
A default implementation for those servers that haven’t migrated yet
func start(address: BindAddress?) throws
A default implementation that throws ServerStartError.unsupportedAddress
for .unixDomainSocket(path:)
if start(address:)
is not implemented by the conforming type, or calls the deprecated .start(hostname:port:)
method for other cases.
func start(hostname: String?, port: Int?) throws
Start the server with the specified hostname and port, if provided. If left blank, the server will be started with its default configuration.