dart-sdk/pkg/dart_service_protocol_shared
Dan Chevalier cf0d8e9556 Fix streamNotify so that it works with binary data
Change-Id: I173ebf46b4ec2bcb138e26456ec40f1fc8faaa19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337900
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2023-11-22 21:06:50 +00:00
..
lib Fix streamNotify so that it works with binary data 2023-11-22 21:06:50 +00:00
test Fix streamNotify so that it works with binary data 2023-11-22 21:06:50 +00:00
.gitignore
analysis_options.yaml
CHANGELOG.md Fix streamNotify so that it works with binary data 2023-11-22 21:06:50 +00:00
LICENSE Improve DSPS Readme and remove todos. 2023-11-16 21:00:29 +00:00
OWNERS
pubspec.yaml Fix streamNotify so that it works with binary data 2023-11-22 21:06:50 +00:00
README.md Improve DSPS Readme and remove todos. 2023-11-16 21:00:29 +00:00

An unlisted package for sharing code for service events and stream management between Dart SDK internal services.

The Dart Developer Service and Dart Tooling Daemon are the main consumers of this package.

Expected SLO: this package is maintained for our own tooling; we may not be able to respond to all issues and may only address the ones that we ourselves encounter.

Details

This package helps handle some of the plumbing required to setup client communication for a service. The main behavior that it helps with is:

  • StreamManager
    • allows a client to subscribe/cancel to a stream with streamListen/streamCancel.
    • allows a client to post a message to a stream with postEvent.
  • Client, an interface that ensures the client is equipped to:
    • handle method requests with sendRequest.
    • handle receiving a message sent to a stream with streamNotify.
  • ClientManager, keeps track of clients connected to a service.
    • addClient should be called when a client connects to your service.
    • removeClient should be called when it disconnects.

Usage

To see an example of how dart_service_protocol_shared is used see: