Hello Sungwon,

I think that will work.
But why don't  you use the same ProtocolCodecFilter instance for both
acceptors ?
And you could also share one IoHandler instance.

Maarten


On 9/4/07, Sungwon Jung <[EMAIL PROTECTED]> wrote:
>
> 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?
>
> --below--
> [Server.java]
>
> 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 );
> --end--
>

Reply via email to