RpcClient class final
Typed client for generated server-function references.
Constructors
- RpcClient({required Uri baseUri, required RpcTransport transport, Serializer? serializer, RpcHeadersProvider? headersProvider, String functionPath = '/__odroe/functions', int maxResponseFrameBytes = defaultMaxResponseFrameBytes})
- Creates a client for one Odroe server origin.
Properties
- baseUri → Uri
-
Origin used to resolve server-function URLs.
final
- functionPath → String
-
URL prefix for server-function endpoints.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headersProvider → RpcHeadersProvider?
-
Creates fresh application headers for every value or stream request.
final
- maxResponseFrameBytes → int
-
Maximum bytes accepted for one typed value or stream response frame.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serializer → Serializer
-
Serializer used for request and response values.
final
- transport → RpcTransport
-
Transport used for every request.
final
Methods
-
call<
I, O> (ServerFunctionRef< I, O> function, I data, {Future<void> ? cancelled}) → Future<O> -
Calls a value-returning server
function. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stream<
I, T> (ServerStreamFunctionRef< I, T> function, I data, {Future<void> ? cancelled}) → Future<Stream< T> > -
Calls a streaming server
function. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultMaxResponseFrameBytes → const int
- Default maximum size of one typed response frame: 1 MiB.