dev@grizzly.java.net

problems of the SNI from Lee

From: Lee You <lee.y.y.you_at_gmail.com>
Date: Sat, 24 Jan 2015 16:08:26 +1300

Dear Sir/Madam,



I am Lee. These days, I am just trying to study the SNI of Grizzly, even
after read your source code of the SNITest.java, I still do not know how to
let it works. Because, i do not understand:

1. How to bind to my Grizzly HTTP server supporting the HTTPS(SSL/TLS)
to proved web services? Just using the TCPNIOTransport to bind a different
port or need to bind to as same port as the Http server?

2. Could you explain the meaning of the code with blue color as
//below:

Do I need this line in my own code?

Can I switch to different SSL server configure for their host for
supporting SNI in there?

If it return null, what will be happened for that host?

//////////////////////////

ilter.setServerSSLConfigResolver(new SNIServerConfigResolver() {



            @Override

            public SNIConfig resolve(Connection connection, String
hostname) {

                *sniHostAttr.set(connection, hostname);*



                return SNIConfig.newServerConfig(sslServerEngineConfig);

            }

        });



Thanks! and looking forward for your reply!



Best Regards,

Lee