Ejemplo n.º 1
0
  protected Session startClient(
      short version, InetSocketAddress socketAddress, SessionFrameListener listener)
      throws Exception {
    if (clientFactory == null) {
      QueuedThreadPool threadPool = new QueuedThreadPool();
      threadPool.setName(threadPool.getName() + "-client");
      clientFactory = newSPDYClientFactory(threadPool);
      clientFactory.start();
    }

    return clientFactory
        .newSPDYClient(version)
        .connect(socketAddress, listener)
        .get(5, TimeUnit.SECONDS);
  }
 @Before
 public void init() throws Exception {
   factory = new SPDYClient.Factory(sslContextFactory);
   factory.start();
 }