ServerAttachClient class
The attacher's half of the protocol — what the GUI core, fw and MCP use
to read a live server.
connect performs the meta/attach handshake, so constructing one of
these is an attachment: the ring replays into events (marked
ServerEvent.isReplay), then the live tail follows. A liveness probe that
wants no replay should just Socket.connect and destroy — the server
writes nothing to a connection that has not attached.
Properties
-
done
→ Future<
void> -
Resolves when the server goes away.
no setter
-
events
→ Stream<
ServerEvent> -
Fires after each event is appended to received — a change signal, not
the storage.
no setter
- handle → ServerHandle
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hello → ServerHello
-
Available once connect returned.
no setter
-
received
→ List<
ServerEvent> -
Every event this attachment has seen — the replay, then the live tail.
no setter
- replayComplete → bool
-
Flips when the replay boundary passes; events after this are live.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
details(
int eventId) → Future< Map< String, Object?> ?> - The lazily-held details of one event — headers, bodies — or null when the server never captured them or has since evicted them.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
request(
String channel, String method, [Map< String, Object?> params = const {}]) → Future<Map< String, Object?> > -
Sends a
reqframe and returns the response payload; throws ServerRequestException when the server answers witherr— a missing handler, or the handler itself throwing. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
connect(
ServerHandle handle, {Duration timeout = const Duration(seconds: 2)}) → Future< ServerAttachClient> - Connects and attaches, or throws — on refused connect, on timeout, on a hello that never comes. The caller decides whether a failure means "delete the handle" (attachToServer does).