Server.withoutJson constructor

  1. StreamChannel _channel,
  2. {ErrorCallback onUnhandledError,
  3. bool strictProtocolChecks: true}

Creates a Server that communicates using decoded messages over channel.

Unlike new 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.


    {this.onUnhandledError, this.strictProtocolChecks = true});