You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After some discussion with @jimpo, let's make the API more convenient to use.
As a first step, let's add a SharedClient and a SharedServer. See the sketches below.
As a second step, let's rename things around: RawClient/RawServer should become ClientTransport/ServerTransport, Client/Server should become RawClient/RawServer, and SharedClient/SharedServer should become Client/Server.
implSharedServer<...> {/// Registers a request that the server must handle. Returns an error if already registered.pubfnregister_request<Params,Ret>(&self, method: ...) -> RequestHandler<Params,Ret>;pubfnregister_subscription<Notif>(&self, subscribe_method: ..., unsubscribe_method: ...) -> Subscription<Notif>;}impl<Params,Ret> RequestHandler<Params,Ret>{/// User must call this repeatedly and answer the requests.pubasyncfnnext(&mutself) -> ...;}impl<Notif> Subscription<Notif>{pubasyncfnsend_all(&self,to_send:Notif){ ...}}
The text was updated successfully, but these errors were encountered:
Since we can't implement SharedClient/SharedServer in a no_std environment, we theoretically shouldn't put them in jsonrpsee-core but in a different crate.
Note that local.rs would be concerned as well.
After some discussion with @jimpo, let's make the API more convenient to use.
As a first step, let's add a
SharedClient
and aSharedServer
. See the sketches below.As a second step, let's rename things around:
RawClient
/RawServer
should becomeClientTransport
/ServerTransport
,Client
/Server
should becomeRawClient
/RawServer
, andSharedClient
/SharedServer
should becomeClient
/Server
.Sketches for the new API layers:
The text was updated successfully, but these errors were encountered: