Namespace class
a Class that represents a Socket Namespace.
- Inheritance
-
- Object
- EventEmitter
- Namespace
Properties
- adapter ↔ Adapter
-
getter/setter pair
-
connected
↔ Map<
String, Socket> -
getter/setter pair
- flags ↔ Map
-
getter/setter pair
-
fns
↔ List<
Function> -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- ids ↔ int
-
getter/setter pair
- name ↔ String
-
getter/setter pair
-
rooms
↔ List<
String> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- server ↔ ServerIO
-
getter/setter pair
-
sockets
↔ List<
Socket> -
getter/setter pair
Methods
-
add(
Client client, dynamic query, Function? fn) → Socket - Adds a new client.
-
clearListeners(
) → void -
inherited
-
clients(
dynamic fn([dynamic _])) → Namespace - Gets a list of clients.
-
compress(
dynamic compress) → Namespace - Sets the compress flag.
-
emit(
String event, [dynamic argument]) → void -
Emits to all clients.
override
-
hasListeners(
String event) → bool -
inherited
-
initAdapter(
) → void -
Initializes the
Adapter
for this nsp. Run upon changing adapter byServer#adapter
in addition to the constructor. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
off(
String event, [EventHandler? handler]) → void -
inherited
-
on(
String event, EventHandler handler) → void -
inherited
-
once(
String event, EventHandler handler) → void -
inherited
-
remove(
dynamic socket) → void -
Removes a client. Called by each
Socket
. -
run(
dynamic socket, Function fn) → void - Executes the middleware for an incoming client.
-
send(
[dynamic args]) → Namespace -
Sends a
message
event to all clients. -
to(
String name) → Namespace - Targets a room when emitting.
-
toString(
) → String -
A string representation of this object.
inherited
-
use(
dynamic fn) → Namespace - Sets up namespace middleware.
-
write(
[dynamic args]) → Namespace
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited