add runOnce to Client

This commit is contained in:
Vaci Koblizek 2020-10-02 21:36:29 +01:00
parent 9c5e080f90
commit 7d3e79091b

View file

@ -1,6 +1,7 @@
package org.capnproto; package org.capnproto;
import java.nio.channels.AsynchronousByteChannel; import java.nio.channels.AsynchronousByteChannel;
import java.util.concurrent.CompletableFuture;
public class TwoPartyClient { public class TwoPartyClient {
@ -30,4 +31,8 @@ public class TwoPartyClient {
: RpcTwoPartyProtocol.Side.CLIENT); : RpcTwoPartyProtocol.Side.CLIENT);
return rpcSystem.bootstrap(vatId.asReader()); return rpcSystem.bootstrap(vatId.asReader());
} }
public synchronized CompletableFuture<?> runOnce() {
return this.rpcSystem.runOnce();
}
} }