WebSocket
public class WebSocket
Main class for the Kitura-WebSocket API. Used to register WebSocketService classes
that will handle WebSocket connections for specific paths.
-
Register a
WebSocketServicefor a specific pathDeclaration
Swift
public static func register(service: WebSocketService, onPath path: String)Parameters
serviceThe
WebSocketServicebeing registered.onPathThe path that will be in the HTTP “Upgrade” request. Used to connect the upgrade request with a specific
WebSocketServiceCaps-insensitive. -
Unregister a
WebSocketServicefor a specific pathDeclaration
Swift
public static func unregister(path: String)Parameters
pathThe path on which the
WebSocketServicebeing unregistered, was registered on.
View on GitHub
WebSocket Class Reference