StreamLspEndpoint class
A byte-stream endpoint using LSP Content-Length framing. Suitable for
stdio (see the apollovm lsp CLI command) or a socket/WebSocket byte channel.
- Inheritance
-
- Object
- LspEndpoint
- StreamLspEndpoint
Constructors
-
StreamLspEndpoint(Stream<
List< _input, StreamSink<int> >List< _output)int> >
Properties
-
done
→ Future<
void> -
Completes when the endpoint closes.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- onNotification ↔ NotificationHandler?
-
getter/setter pairinherited
- onRequest ↔ RequestHandler?
-
getter/setter pairinherited
- onResponse ↔ ResponseHandler?
-
Invoked for a JSON-RPC response (a message with an
idbut nomethod), i.e. the peer's reply to a request this endpoint sent. Set by LspClient; left null by a pure server, which never issues requests.getter/setter pairinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
handleMessage(
Object? message) → Future< void> -
Routes one decoded incoming JSON-RPC message.
inherited
-
listen(
) → void -
Begins consuming input. No-op for push-based endpoints (e.g. web).
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendNotification(
String method, Object? params) → void -
Sends a notification to the peer.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeMessage(
Map< String, Object?> message) → void -
Writes a fully-formed JSON-RPC message to the wire.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited