Le 6 sept. 2011 à 13:02, Emmanuel Lecharny a écrit :

> 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.
> 
> 
Thanks for your answer. Unfortunately, I forgot to mention that, but I'm 
already in character mode :
olekhnov% setenv MODE character
olekhnov% setenv TERM_PROGRAM_VERSION
 "12.3.7"
olekhnov% telnet localhost -2000
Trying ::1...
Connected to localhost.
Escape character is '^]'.




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

-----------------------------------------------------
Jean David Olekhnovitch
[email protected]
Gsm : 06 74 57 96 34
Fax : 08 11 38 65 32
Gtalk : [email protected]
Skype : olekhnov

16 rue Roland Brousse
La Cassière
63970 Aydat
www.olek.fr
www.360emedia.fr

" I often quote myself ; it adds spice to my conversation."  G. B. Shaw

Reply via email to