public static ServerSession newSession(ClashServices services,Connection clientConnection,Main.ServerCommand command) throws IOException {
  ServerSession session=new ServerSession(services,clientConnection,command);
  localSession.set(session);
  try {
    Thread t=new Thread(null,clientConnection.getName() + " server");
    t.start();
    t.join();
  }
 catch (  InterruptedException e) {
    session.shutdown();
  }
 finally {
    localSession.set(null);
  }
  return session;
}

public static ServerSession newSession ( ClashServices services , Connection clientConnection , Main . ServerCommand command ) throws IOException { ServerSession session = new ServerSession ( services , clientConnection , command ) ; localSession . set ( session ) ; try { Thread t = new Thread ( null , clientConnection . getName ( ) + " server" ) ; t . start ( ) ; t . join ( ) ; } catch ( InterruptedException e ) { session . shutdown ( ) ; } finally { localSession . set ( null ) ; } return session ; }
serve a clash session . this will block until processing completes , or until the calling thread is interrupted . < p > normal completion is usually the result of an eof on the input stream .
