From 59c6913d0d26d0073c86e19758ea17fb6648e275 Mon Sep 17 00:00:00 2001 From: Vaci Koblizek Date: Mon, 7 Dec 2020 19:07:56 +0000 Subject: [PATCH] EzRpcServer expects internet sockets --- runtime-rpc/src/main/java/org/capnproto/EzRpcServer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/runtime-rpc/src/main/java/org/capnproto/EzRpcServer.java b/runtime-rpc/src/main/java/org/capnproto/EzRpcServer.java index 2764c5a..ccd313f 100644 --- a/runtime-rpc/src/main/java/org/capnproto/EzRpcServer.java +++ b/runtime-rpc/src/main/java/org/capnproto/EzRpcServer.java @@ -2,7 +2,6 @@ package org.capnproto; import java.io.IOException; import java.net.InetSocketAddress; -import java.net.SocketAddress; import java.nio.channels.AsynchronousChannelGroup; import java.nio.channels.AsynchronousServerSocketChannel; import java.util.concurrent.CompletableFuture; @@ -15,11 +14,11 @@ public class EzRpcServer { private final TwoPartyServer twoPartyRpc; private final int port; - public EzRpcServer(Capability.Server bootstrapInterface, SocketAddress address) throws IOException { + public EzRpcServer(Capability.Server bootstrapInterface, InetSocketAddress address) throws IOException { this(new Capability.Client(bootstrapInterface), address); } - public EzRpcServer(Capability.Client bootstrapInterface, SocketAddress address) throws IOException { + public EzRpcServer(Capability.Client bootstrapInterface, InetSocketAddress address) throws IOException { this.channelgroup = AsynchronousChannelGroup.withThreadPool(Executors.newFixedThreadPool(1)); this.serverAcceptSocket = AsynchronousServerSocketChannel.open(this.channelgroup); this.serverAcceptSocket.bind(address);