You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Ashish <pa...@gmail.com> on 2009/02/03 09:47:34 UTC
Using APR transport - Porting Time Server example
Was playing around with APR transport API, and had ported Time server
example to use APR transport
Just has to do two things
1. download tcnative DLL (using W$). Downloaded from
(http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.16/binaries/win32/tcnative-1.dll)
and placed in PATH
2. Changed the Acceptor to AprSocketAccpetor
IoAcceptor acceptor = new AprSocketAcceptor();
The example worked fine.
Queries
1. Have I downloaded the correct version of tcnative dll?
2. The behavior is not same for NioSocketAcceptor and
AprSocketAcceptor for Address Already in use
For NioSocketAcceptor, we throw java.net.BindException, and for
AprSocketAcceptor it's java.net.IoException.
Agree that IoException is up in hierarchy of BindException. Shouldn't
we have the same behavior for all IoAcceptor's?
Is there anything else that need to be taken care of???
Plan put up a small wiki page on using Apr Transport
thanks
- ashish
Re: Using APR transport - Porting Time Server example
Posted by jean-frederic clere <jf...@gmail.com>.
Ashish wrote:
> Was playing around with APR transport API, and had ported Time server
> example to use APR transport
>
> Just has to do two things
> 1. download tcnative DLL (using W$). Downloaded from
> (http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.16/binaries/win32/tcnative-1.dll)
> and placed in PATH
> 2. Changed the Acceptor to AprSocketAccpetor
>
> IoAcceptor acceptor = new AprSocketAcceptor();
>
> The example worked fine.
>
> Queries
> 1. Have I downloaded the correct version of tcnative dll?
Yes that is the right version.
> 2. The behavior is not same for NioSocketAcceptor and
> AprSocketAcceptor for Address Already in use
>
> For NioSocketAcceptor, we throw java.net.BindException, and for
> AprSocketAcceptor it's java.net.IoException.
> Agree that IoException is up in hierarchy of BindException. Shouldn't
> we have the same behavior for all IoAcceptor's?
Yes that would be better.
>
> Is there anything else that need to be taken care of???
> Plan put up a small wiki page on using Apr Transport
Cool.
Cheers
Jean-Frederic
>
> thanks
> - ashish
>