Not sure I understand your issue. MINA is NIO framework. The beauty is you don't need to understand NIO to work it, it gives unified API's to work with. Explore MINA core package source if need more details.
Regarding, writing without using ByteBuffer, I don't think its possible in MINA. You have to use IoBuffer (wrapper over ByteBuffer). thanks On Wed, Mar 25, 2009 at 6:07 AM, Babak Farhang <[email protected]> wrote: > Err.. new to Mina, and not communicating very clearly. :-x > > After playing with org.apache.mina.example.httpserver.codec.Server a > bit more in the debugger, I see how to write a non-blocking response > by first writing it to a ByteBuffer and then passing that ByteBuffer > into the IoSession's write method. The IoSession (a SocketSessionImpl > instance, in this case) takes care of registering the interest-op on > the nio Selector, and calling non-blocking writes on the socket using > the contained nio.ByteBuffer. > > Still, I don't understand how to write to the socket in non blocking > manner w/o first writing it all to a ByteBuffer. For example, how to > write the first 10**7 digits of Pi without first righting those digits > into a ByteBuffer? OK, that's a contrived example of dynamically > generated content, but you see my issue, I hope :) > > Thanks in advance > -Babak > > > On Tue, Mar 24, 2009 at 11:07 AM, Babak Farhang <[email protected]> wrote: >> Hi, >> >> I was hoping to find an example of a non-blocking I/O app using Mina >> and TCP transport. Looked at >> org.apache.mina.example.httpserver.codec.Server but that doesn't seem >> to be non-blocking either. Any pointers please? >> >> Regards, >> -Babak >> > -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal
