On 9/6/11 12:50 PM, Jean David Olekhnovitch wrote:
Hi there,
I'm playing with Mina for a while, it's really a great tool, well designed, a 
real pleasure to use !

Unfortunately, I'm stucking with a problem which is, I'm sure, really stupid, 
but I can't find any information about that

I have to print datas received from a socket in real time, byte after byte

my sample is really really simple :
         IoAcceptor acceptor = new NioSocketAcceptor();
         acceptor.getFilterChain().addLast( "logger", new LoggingFilter() );
         acceptor.setHandler( new POC() );
         acceptor.getSessionConfig().setReadBufferSize( 1 );
         acceptor.bind( new InetSocketAddress(2000) );

where POC is a simple IoHandlerAdapter, with a method messageReceived which 
print datas received byte per byte

my client is a simple telnet :
telnet localhost 2000


it received datas, but not in real time. I have to press "Enter" to send the 
datas to my server. And I want to print on the server each character while the user is 
typing it on his terminal.
Plain normal. Telnet defaults to 'linemode' in order to reduce the number of network packets exchanged. Try sending the 'mode character' in telnet before any exchange with the server.



--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to