mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sungwon Jung" <the...@gmail.com>
Subject ssl and normal socket in one server
Date Tue, 04 Sep 2007 10:47:36 GMT
Hello. I'm develop server with Mina 1.1.2.

I'm using normal socket but I want ssl also.

so, I opened two port.
one is normal socket port and the other is ssl port.
so I think... server make two SocketAcceptorConfig like below.

am i going well?


SocketAcceptorConfig cfg = new SocketAcceptorConfig();
SocketAcceptorConfig cfg_ssl = new SocketAcceptorConfig();
cfg.setReuseAddress( true );
cfg_ssl.setReuseAddress( true );

cfg.getFilterChain().addLast( "codec", new ProtocolCodecFilter( new
ServerCodecFactory() );
cfg_ssl.getFilterChain().addLast( "codec_ssl", new
ProtocolCodecFilter( new ServerCodecFactorySSL() );

acceptor.bind( new InetSocketAddress( 9009 ), new ServerSessionHandler(), cfg );
acceptor.bind( new InetSocketAddress( 9010 ), new ServerSessionHandler(), cfg );

View raw message