Server class
Constructors
-
Server({dynamic server, Map? options})
-
Server constructor.
Properties
-
adapter
↔ String
-
Sets the adapter for rooms.
getter/setter pair
-
encoder
↔ Encoder
-
getter/setter pair
-
engine
↔ Engine?
-
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
httpServer
↔ StreamServer?
-
getter/setter pair
-
nsps
↔ Map<String, Namespace>
-
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
sockets
↔ Namespace
-
getter/setter pair
Methods
-
attach(dynamic srv, [Map? opts])
→ 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()
→ void
-
Closes server connection
-
compress(dynamic _)
→ Namespace
-
-
emit(dynamic event, dynamic data)
→ void
-
-
listen(dynamic srv, [Map? opts])
→ 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
-