}
private static RequestChannel createRequestChannel(URI target) throws IOException, URISyntaxException {
SocketSyncChannelFactory factory = new SocketSyncChannelFactory();
SyncChannel channel = factory.openSyncChannel(target);
SocketMetadata socket = (SocketMetadata) channel.narrow(SocketMetadata.class);
socket.setTcpNoDelay(true);
return new AsyncChannelToClientRequestChannel(
new PacketAggregatingSyncChannel(
channel));
}