package com.xjeffrose.xio.client;

import com.google.common.net.HostAndPort;
import com.google.common.util.concurrent.ListenableFuture;
import com.xjeffrose.xio.client.retry.RetryPolicy;
import com.xjeffrose.xio.client.retry.RetrySleeper;
import com.xjeffrose.xio.core.ShutdownUtil;
import io.airlift.units.Duration;
import io.netty.bootstrap.Bootstrap;
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.util.Timer;
import java.io.Closeable;
import java.net.InetSocketAddress;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import org.apache.log4j.Logger;

import java.io.IOException;

import com.xjeffrose.xio.server.XioService;

import static com.google.common.base.Preconditions.checkNotNull;

public class XioClient implements Closeable {
  private static final Logger log = Logger.getLogger(XioClient.class);

  public XioClient(String HostAndPort, XioService xioService) {

  }

  public XioClient(XioClientConfig xioClientConfig, XioService xioService) {

  }

  private static InetSocketAddress toInetAddress(HostAndPort hostAndPort) {
    return (hostAndPort == null) ? null : new InetSocketAddress(hostAndPort.getHostText(), hostAndPort.getPort());
  }


  @Override
  public void close() throws IOException {
  }

}

@@ -1055,16 +1055,39 @@
 ception;
+%0Aimport java.util.List;
 %0A%0Aimport
@@ -1124,16 +1124,75 @@
 ervice;%0A
+import com.xjeffrose.xio.client.loadbalancer.Distributor;%0A%0A
 %0Aimport 
@@ -1391,26 +1391,188 @@
 ent(
+Distributor distributor, XioService xioService) %7B%0A  %7D%0A%0A  public XioClient(List%3CString%3E serverList, XioService xioService) %7B%0A  %7D%0A%0A  public XioClient(String zkConnection
 String
- Host
 AndP
-ort
+ath
 , Xi
@@ -1586,33 +1586,32 @@
 e xioService) %7B%0A
-%0A
   %7D%0A%0A  public Xi
@@ -1676,17 +1676,16 @@
 vice) %7B%0A
-%0A
   %7D%0A%0A  p

add constructors to XioClient