Hi All,
I would like to have my listener handle requests on port 443 (ssl) and 8080
and I'm not sure how to do that.
I understand that I can do this:
// Listen of the given port
ioReactor.listen(new InetSocketAddress(443));
ioReactor.listen(new InetSocketAddress(8080));
// Ready to go!
ioReactor.execute(ioEventDispatch);
However, the ioEventDispatch is tied to
// Create server-side I/O event dispatch
IOEventDispatch ioEventDispatch = new
DefaultHttpServerIODispatch(protocolHandler, connFactory);
and the connFactory is
NHttpConnectionFactory<DefaultNHttpServerConnection> connFactory;
SSLContext sslcontext = SSLContext.getInstance("TLS");
sslcontext.init(keymanagers, null, null);
connFactory = new SSLNHttpServerConnectionFactory(sslcontext, null,
ConnectionConfig.DEFAULT);
So how do I get the ioEventDispatch to handle incoming connections on 443
and 8080? I will have separate HttpAsyncRequestHandlers to deal with the
request types - one handler for 443 and several different handlers for 8080.
Thanks in advance,
Jax.
--
View this message in context:
http://httpcomponents.10934.n7.nabble.com/Multiple-ports-for-Listening-IO-Reactor-tp23883.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]