Search code examples
javasocketsnioapache-mina

Use NIO server with IO client


I have server worked with NIO based on Mina.

I try to make TCP/IP client for this server using usual java.net.Socket technique. I can successfully establish connection (i.e. org.apache.mina.core.service.IoHandler.sessionOpened invoked on server side after opening socket on client side). But if I try to write some bytes to socket (from client side) I have no any effect on server (i.e. org.apache.mina.core.service.IoHandler.messageReceived doesn't invoked).

Could you please explain why this is happen and is that possible to send some message to my NIO server from my usual client's Socket-based app?


Solution

  • do you installed your IoHandler in the acceptor ?