Client.sendRequest() now throws a
StateError if the client is closed while the request is in-flight. This avoids dangling
Futures that will never be completed.
Client.sendNotification() now throw
StateErrors if they're called after the client is closed.
StateErrorcould be top-leveled if
Peer.close()was called before the underlying channel closed.
Breaking change: all constructors now take a
StreamChannel rather than a
Client.sendNotification() no longer throw
StateErrors after the connection has been closed but before
Client.close() has been called.
close() methods may now be called before their corresponding
close() methods now wait on the result of closing the underlying
StreamSink. Be aware that in some circumstances
Sink.close() futures may never complete.
Server.isClosed, which make it possible to synchronously determine whether the connection is open. In particular, this makes it possible to reliably tell whether it's safe to call
Fix a race condition in
Server where a
StateError could be thrown if the connection was closed in the middle of handling a request.
Improve stack traces for error responses.
Client class for communicating with external JSON-RPC 2.0 servers.
Peer class that's both a
Client and a
new Server() takes a
Stream and a
StreamSink and uses those behind-the-scenes for its communication.
Server.listen(), which causes the server to begin listening to the underlying request stream.
Server.close(), which closes the underlying request stream and response sink.
RpcExceptionwhen not a map.