Server class

Server: dispatches inbound calls to registered methods.

Constructors

Server()

Properties

endpoint → Endpoint?
The endpoint this server is attached to (retained so it outlives serveEndpoint; read loops keep it alive regardless).
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispatchCall(CallContext ctx, Headers headers, StreamInput input, ServerSink send) → Future<StatusException?>
Dispatch one call against the registered handler table with a caller-supplied response sink (raw payloads). This is the seam generated non-gRPC servers (Connect mux) dispatch through, reusing the exact handler table this Server serves as gRPC-DC.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerService(ServiceDesc desc) → void
Adds a service's methods (generated code calls it).
serveEndpoint(Endpoint endpoint) → void
Attach to an existing endpoint (starts its read loop).
serveTransport(Transport transport) → Endpoint
Attach to a transport (even stream ids); returns the Endpoint.
setStructCodec(bool enabled) → void
Enable the struct codec on this server: a call carrying HEADERS dc-codec: struct-v1 is decoded with the struct codec and answered in kind. A struct-v1 request to a server without it enabled fails Unimplemented, as does any other dc-codec value. Mirrors the Go Server.SetStructCodec.
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

kindBidi → const String
kindClientStreaming → const String
kindServerStreaming → const String
kindUnary → const String