code: protected void startSession()throws SocksException{
  	   
  	   System.out.println("Session: " + proxyHost + ":" + proxyPort);
         try{
           if(chainProxy == null)
              proxySocket = new Socket(proxyIP,proxyPort);
           else if(proxyIP != null)
              proxySocket = new SocksSocket(chainProxy,proxyIP,proxyPort);
           else
              proxySocket = new SocksSocket(chainProxy,proxyHost,proxyPort);
  
           in = proxySocket.getInputStream();
           out = proxySocket.getOutputStream();
         }catch(SocksException se){
           throw se;
         }catch(IOException io_ex){
           throw new SocksException(SOCKS_PROXY_IO_ERROR,""+io_ex);
         }
     }
docs: =================