using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading.Tasks; using Capnp; using Capnp.Rpc; using FabAccessAPI.Schema; namespace FabAccessAPI { class Connection { private TcpRpcClient _rpcClient; private IBootstrap _bootstrapCap; private User _user; private Auth _auth; /// /// /// /// Should be an already configured and connected TcpRpcClient public Connection(TcpRpcClient rpcClient) { _rpcClient = rpcClient; _bootstrapCap = _rpcClient.GetMain(); } async Task Auth(string mech, Dictionary kvs) { _auth = new Auth(await _bootstrapCap.Auth()); var mechs = await _auth.GetMechanisms().ConfigureAwait(false); } } }