Server.withoutJson constructor
Server.withoutJson(
- StreamChannel _channel, {
- ErrorCallback? onUnhandledError,
- bool strictProtocolChecks = true,
Creates a Server that communicates using decoded messages over
channel
.
Unlike Server, this doesn't read or write JSON strings. Instead, it reads and writes decoded maps or lists.
Note that the server won't begin listening to requests
until
Server.listen is called.
Unhandled exceptions in callbacks will be forwarded to onUnhandledError
.
If this is not provided, unhandled exceptions will be swallowed.
If strictProtocolChecks
is false, this Server will accept some
requests which are not conformant with the JSON-RPC 2.0 specification. In
particular, requests missing the jsonrpc
parameter will be accepted.
Implementation
Server.withoutJson(this._channel,
{this.onUnhandledError, this.strictProtocolChecks = true});