ProtocolHandlerFactory
public protocol ProtocolHandlerFactory
A protocol that should be implemented by connection upgraders of other protocols like WebSocket.
This protocol provides a common interface to the HTTPServer
to upgrade an incoming HTTP connection
to the desired protocol.
-
Name of the protocol
Declaration
Swift
var name: String { get }
-
Supply an NIO channel handler for the protocol. Every upgrade request must get its own handler.
Declaration
Swift
func handler(for request: ServerRequest) -> ChannelHandler
-
Checks if a service is available/registered at the given URI
Declaration
Swift
func isServiceRegistered(at path: String) -> Bool
-
Undocumented
Declaration
Swift
func extensionHandlers(header: String) -> [ChannelHandler]
-
Undocumented
Declaration
Swift
func negotiate(header: String) -> String