MethodCodec class abstract

A codec for method calls and enveloped results.

All operations throw an exception, if conversion fails.

See also:

Implementers

Constructors

MethodCodec()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decodeEnvelope(ByteData envelope) → dynamic
Decodes the specified result envelope from binary.
decodeMethodCall(ByteData? methodCall) MethodCall
Decodes the specified methodCall from binary.
encodeErrorEnvelope({required String code, String? message, Object? details}) ByteData
Encodes an error result into a binary envelope.
encodeMethodCall(MethodCall methodCall) ByteData
Encodes the specified methodCall into binary.
encodeSuccessEnvelope(Object? result) ByteData
Encodes a successful result into a binary envelope.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited