public static ProxySession newSession(MessageFactory messageFactory,Connection clientConnection,Connection serverConnection,PduFilter... filters) throws IOException {
  ProxySession session=new ProxySession(messageFactory,clientConnection,serverConnection,filters);
  localSession.set(session);
  try {
    session.start();
    session.await();
  }
 catch (  InterruptedException e) {
    session.shutdown();
  }
 finally {
    localSession.set(null);
  }
  return session;
}

public static ProxySession newSession ( MessageFactory messageFactory , Connection clientConnection , Connection serverConnection , PduFilter ... filters ) throws IOException { ProxySession session = new ProxySession ( messageFactory , clientConnection , serverConnection , filters ) ; localSession . set ( session ) ; try { session . start ( ) ; session . await ( ) ; } catch ( InterruptedException e ) { session . shutdown ( ) ; } finally { localSession . set ( null ) ; } return session ; }
proxy a connection from a client to a clash server . this will block until processing completes , or until the calling thread is interrupted . < p > normal completion is usually the result of an eof on one of the input streams .
