WebSocket
WebSockets are a protocol for bidirectional, full-duplex, message-oriented communication over the web. Basically, it's a way to send messages between a client and a server.
WebSockets will be available on the configured in the Runtime Configuration file.
WebSocket Controllers#
Swift support an unlimited amount of socket endpoints (routes) in your application. This is done by creating WebSocketControllers. A WebSocketController is a class that extends the \Swift\WebSocket\Controller\AbstractWebSocketController class and applies the Swift\WebSocket\Attributes\SocketRoute attribute.
Protecting your routes#
Like with REST routes it's also possible to protect your routes. For this is are isGranted directive in the SocketRoute attribute.