WebSocketController class
A special controller that also supports WebSockets.
Constructors
Properties
- app → Angel
-
The
Angel
application powering this controller.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- injectSingleton → bool
-
If
true
(default), this class will inject itself as a singleton into theapp
's container when bootstrapped.finalinherited -
middleware
↔ List<
RequestHandler> -
Middleware to run before all handlers in this class.
getter/setter pairinherited
-
mountPoint
→ SymlinkRoute<
RequestHandler> ? -
The route at which this controller is mounted on the server.
no setterinherited
-
routeMappings
↔ Map<
String, Route> -
A mapping of route paths to routes, produced from the
Expose
annotations on this class.getter/setter pairinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- ws → AngelWebSocket
-
The plug-in instance powering this controller.
final
Methods
-
applyRoutes(
Router< RequestHandler> router, Reflector reflector) → Future<String> -
Applies the routes from this
Controller
to somerouter
.inherited -
broadcast(
String eventName, dynamic data, {dynamic filter(WebSocketContext socket)?}) → void - Sends an event to all clients.
-
configureRoutes(
Routable routable) → FutureOr< void> -
Used to add additional routes or middlewares to the router from within
a
Controller
.inherited -
configureServer(
Angel app) → Future -
Applies routes, DI, and other configuration to an
app
. -
findExpose(
Reflector reflector, {bool concreteOnly = false}) → Expose? -
Finds the
Expose
declaration for this class.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAction(
WebSocketAction action, WebSocketContext socket) → dynamic - Fired on all incoming actions.
-
onConnect(
WebSocketContext socket) → dynamic - Fired on new connections.
-
onData(
dynamic data, WebSocketContext socket) → dynamic - Fired on arbitrary incoming data.
-
onDisconnect(
WebSocketContext socket) → dynamic - Fired on disconnections.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited