Code example for SingleClientConnManager

0
         
        HttpProtocolParams.setVersion(httpParams, HttpVersion.HTTP_1_1);
        HttpProtocolParams.setUseExpectContinue(httpParams, false);
         
//        ThreadSafeClientConnManager  connectionManager = new ThreadSafeClientConnManager(httpParams,supportedSchemes); 
        SingleClientConnManager singleClientConnManager=new SingleClientConnManager(httpParams,supportedSchemes);
        HttpConnectionParams.setConnectionTimeout(httpParams, conTimeOutMs);
        HttpConnectionParams.setSoTimeout(httpParams, soTimeOutMs);
         
        HttpClientParams.setCookiePolicy(httpParams, CookiePolicy.BROWSER_COMPATIBILITY);
//        httpClient=new DefaultHttpClient(connectionManager, httpParams); 
        httpClient=new DefaultHttpClient(singleClientConnManager, httpParams);
    } 
 
    /** 
     * Get方法传送消息 
     *  
     * @param url  连接的URL 
     * @param queryString  请求参数串 
     * @return 服务器返回的信息 
     * @throws Exception