Commit 880041bb authored by Kenton Varda's avatar Kenton Varda

Merge pull request #201 from jparyani/add-bootstrap-twopartyclient

Allow TwoPartyClient to define a bootstrap interface
parents 0c0ed1d3 bfa8e397
...@@ -179,6 +179,12 @@ TwoPartyClient::TwoPartyClient(kj::AsyncIoStream& connection) ...@@ -179,6 +179,12 @@ TwoPartyClient::TwoPartyClient(kj::AsyncIoStream& connection)
: network(connection, rpc::twoparty::Side::CLIENT), : network(connection, rpc::twoparty::Side::CLIENT),
rpcSystem(makeRpcClient(network)) {} rpcSystem(makeRpcClient(network)) {}
TwoPartyClient::TwoPartyClient(kj::AsyncIoStream& connection,
Capability::Client bootstrapInterface)
: network(connection, rpc::twoparty::Side::CLIENT),
rpcSystem(network, bootstrapInterface) {}
Capability::Client TwoPartyClient::bootstrap() { Capability::Client TwoPartyClient::bootstrap() {
MallocMessageBuilder message(4); MallocMessageBuilder message(4);
auto vatId = message.getRoot<rpc::twoparty::VatId>(); auto vatId = message.getRoot<rpc::twoparty::VatId>();
......
...@@ -134,6 +134,7 @@ class TwoPartyClient { ...@@ -134,6 +134,7 @@ class TwoPartyClient {
public: public:
explicit TwoPartyClient(kj::AsyncIoStream& connection); explicit TwoPartyClient(kj::AsyncIoStream& connection);
TwoPartyClient(kj::AsyncIoStream& connection, Capability::Client bootstrapInterface);
Capability::Client bootstrap(); Capability::Client bootstrap();
// Get the server's bootstrap interface. // Get the server's bootstrap interface.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment