code: private void startSession() throws IOException{
       sock.setSoTimeout(iddleTimeout);
  
       try{
          auth = auth.startSession(sock);
       }catch(IOException ioe){
         log("Auth throwed exception:"+ioe);
         auth = null;
         return;
       }
  
       if(auth == null){ //Authentication failed
          log("Authentication failed");
          return;
       }
  
       in = auth.getInputStream();
       out = auth.getOutputStream();
  
       msg = readMsg(in);
       handleRequest(msg);
     }
docs: ///////////////