Fix the example to act as a server (dart-lang/json_rpc_2#100)

Fixes a bug mentioned in dart-lang/json_rpc_2#50

Both the client and server examples were shown with
`WebSocketChannel.connect`. Update the server to bind the `HttpServer`
instead of trying to connect to a server that hasn't been started.

Add a `client.close()` call to the example so the VM does not continue
running.
3 files changed
tree: 72d27a10b4d7cf107e0d602120519983116a7468
  1. pkgs/