ServerInspector class
The machinery behind FlutterwareServer, constructible directly so tests can point it at a temp dir instead of faking the gates.
This class is now only the transport: a unix socket in the run dir, a
srv-*.json handle beside it, and the predecessor cleanup that makes a
restart self-healing. The ring, the channels, the handlers, the detail
store and the attach handshake are InspectorCore, which knows nothing
about sockets and compiles into a Flutter app.
Constructors
- ServerInspector.start({required String runDir, required String projectRoot, required String name, int ringSize = 500, int detailsByteCap = 16 * 1024 * 1024, int? pid})
-
Starts publishing immediately, but asynchronously: events reported while
the socket is still binding only land in the ring, which is where an
attacher would find them anyway.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
final
- pid → int
-
final
- projectRoot → String
-
final
-
published
→ Future<
void> -
Resolves when the handle is on disk — what tests await. A publish that
failed resolves too: the server must not care.
no setter
- runDir → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startedAt → DateTime
-
final
Methods
-
addEvent(
String channel, Map< String, Object?> payload, {String? rid, Map<String, Object?> ? details}) → void -
debugDropConnections(
) → void - Destroys every attached connection without touching the handle or the socket — a transient drop, as a test stages it.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerHandler(
String channel, String method, ServerCommandHandler handler) → void -
stop(
) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited