Hi Raghu,

I may be wrong, but I don't think this is possible with MINA., natively. You may have to define a new NioSocketConnector where you can pass an already connected socket as a parameter (just an idea, not sure this is easy to do).

Hope it helps (at least a bit ;)


Raghu Angadi wrote:

I thought I will ask again, just to be sure :

My current use case looks like this :

[write socket]---<----( Thread )---<----[read socket]

Traffic from read socket to write socket is pretty low. These are non-blocking NIO sockets created else where (not by MINA). I would like to replace these threads using MINA.

Can someone confirm if it is possible or not possible to use existing sockets with MINA?

Thanks,
Raghu.


Raghu Angadi wrote:

I am thinking of using MINA in Hadoop (hadoop.apache.org).

The initial use case for a simple handler looks like this :

It two NIO TCP sockets (already created somewhere else). It wants to read a few bytes from one and write a few bytes to other. Sometimes it might asynchronously close the session(s).

I downloaded MINA but could not find any examples or interface where it lets me create a new "session" with existing socket. Which IoService would you use for such a case.

All the use cases seem to have the sockets created by MINA.

thanks,
Raghu.




--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to