Server class
Constructors
-
Server({dynamic server, Map? options})
-
Server constructor.
Methods
-
attach(dynamic srv, [Map? opts])
→ Future<Server>
-
Attaches socket.io to a server or port.
-
bind(Engine engine)
→ Server
-
Attaches the static file serving.
-
checkRequest(HttpRequest req, [Function? fn])
→ void
-
Server request verification function, that checks for allowed origins
-
clients(dynamic _)
→ Namespace
-
-
close()
→ Future<void>
-
Closes server connection
-
compress(dynamic _)
→ Namespace
-
-
emit(dynamic event, dynamic data)
→ void
-
-
listen(dynamic srv, [Map? opts])
→ Future<void>
-
Attaches socket.io to a server or port.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
of(dynamic name, [dynamic fn])
→ Namespace
-
Looks up a namespace.
-
off(dynamic event, dynamic handler)
→ void
-
-
on(dynamic event, dynamic handler)
→ void
-
-
once(dynamic event, dynamic handler)
→ void
-
-
onconnection(dynamic conn)
→ Server
-
Called with each incoming transport connection.
-
origins([String? v])
→ dynamic
-
Sets the allowed origins for requests.
-
path([String? v])
→ dynamic
-
Sets the client serving path.
-
send(dynamic _)
→ void
-
-
serveClient([bool? v])
→ dynamic
-
Sets/gets whether client code is being served.
-
set(String key, [dynamic val])
→ Server
-
Backwards compatiblity.
-
to(dynamic _)
→ Namespace
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
use(dynamic _)
→ Namespace
-
-
write(dynamic _)
→ Namespace
-