json_rpc_2 2.0.1 json_rpc_2: ^2.0.1 copied to clipboard
An implementation of the JSON-RPC 2.0 spec.
2.0.1 #
- Fix a race condition in which a
StateError
could be top-leveled ifPeer.close()
was called before the underlying channel closed.
2.0.0 #
-
Breaking change: all constructors now take a
StreamChannel
rather than aStream
/StreamSink
pair. -
Client.sendRequest()
andClient.sendNotification()
no longer throwStateError
s after the connection has been closed but beforeClient.close()
has been called. -
The various
close()
methods may now be called before their correspondinglisten()
methods. -
The various
close()
methods now wait on the result of closing the underlyingStreamSink
. Be aware that in some circumstancesStreamController
s'Sink.close()
futures may never complete.
1.2.0 #
-
Add
Client.isClosed
andServer.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 callClient.sendRequest
. -
Fix a race condition in
Server
where aStateError
could be thrown if the connection was closed in the middle of handling a request. -
Improve stack traces for error responses.
1.1.1 #
- Update the README to match the current API.
1.1.0 #
- Add a
done
getter toClient
,Server
, andPeer
.
1.0.0 #
-
Add a
Client
class for communicating with external JSON-RPC 2.0 servers. -
Add a
Peer
class that's both aClient
and aServer
.
0.1.0 #
-
Remove
Server.handleRequest()
andServer.parseRequest()
. Instead,new Server()
takes aStream
and aStreamSink
and uses those behind-the-scenes for its communication. -
Add
Server.listen()
, which causes the server to begin listening to the underlying request stream. -
Add
Server.close()
, which closes the underlying request stream and response sink.
0.0.2+3 #
- Widen the version constraint for
stack_trace
.
0.0.2+2 #
- Fix error response to include data from
RpcException
when not a map.