I don't get your point.

What would be the benefit of not using bytebuffer/iobuffer?
How else would you like to write digits to the network?

Maybe something like this?

session.write("3.1415926535897932384626433832795");

???
Maybe you can explain a bit more what you would like to do.

br,
Alex



On Tue, 24 Mar 2009 18:37:33 -0600, 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
>>

Reply via email to