Code example for SSLServerSocketFactory

Methods: createServerSocket

0
    public ServerSocket createSocket (int port, int backlog,
                                      InetAddress ifAddress)
        throws IOException 
    {    
        if (!initialized) init();
        ServerSocket socket = sslProxy.createServerSocket(port, backlog,
                                                          ifAddress);
        initServerSocket(socket);
        return socket;
    } 
     
    public Socket acceptSocket(ServerSocket socket)
        throws IOException 
    { 
        SSLSocket asock = null;
        try { 
             asock = (SSLSocket)socket.accept();
             configureClientAuth(asock);
        } catch (SSLException e){
          throw new SocketException("SSL handshake error" + e.toString());
Experience pair programming with AI  Get Codota for Java