Code example for SSLServerSocket

Methods: getNeedClientAuthsetNeedClientAuth

0
     * javax.net.ssl.SSLServerSocket#setNeedClientAuth(boolean need) 
     * javax.net.ssl.SSLServerSocket#getNeedClientAuthCreation() 
     */ 
    public void test_NeedClientAuth() throws Exception { 
        SSLServerSocket sss = getSSLServerSocket();
        sss.setNeedClientAuth(true);
        assertTrue(sss.getNeedClientAuth());
        sss.setNeedClientAuth(false);
        assertFalse(sss.getNeedClientAuth());
    } 
 
    /** 
     * @throws IOException 
     * javax.net.ssl.SSLServerSocket#getUseClientMode() 
     * javax.net.ssl.SSLServerSocket#setUseClientMode(boolean mode) 
     */ 
    public void test_UseClientMode() throws Exception { 
        SSLServerSocket sss = getSSLServerSocket();
        sss.setUseClientMode(false);
        assertFalse(sss.getUseClientMode());
Experience pair programming with AI  Get Codota for Java