NIO difference in behavior between windows and Mac connections

  • Thread starter nooneinparticular314159
  • Start date
N

nooneinparticular314159

I wrote a program using NIO that reads some data from a channel and
immediately echoes it back to the source. If I telnet to the program
using the OS X telnet client running on the local machine, I can type
a string of any length that I want, and when I hit return, the string
I typed is transmitted and echoed back to my telnet client. If I
telnet using the Windows telnet client, what I type is transmitted and
echoed immediately! It's the same echo program doing this, so I'm
trying to figure out what is going on. Is the difference that the
windows client always transmits immediately while the OS X client
waits until you hit return? Or is there something about NIO that I've
overlooked?

Thanks!
 
R

Roedy Green

On Sun, 2 Aug 2009 23:14:45 -0700 (PDT),
Or is there something about NIO that I've
overlooked?

It could be what each client sends as an EOL character and what the
server treats as an EOL character.

Snoop with http://mindprod.com/jgloss/wireshark.html to see what the
difference is.

see http://mindprod.com/jgloss/wireshark.html

--
Roedy Green Canadian Mind Products
http://mindprod.com

"Patriotism is fierce as a fever, pitiless as the grave, blind as a stone, and as irrational as a headless hen."
~ Ambrose Bierce (born: 1842-06-24 died: 1914 at age: 71)
 
T

Tom Anderson

I wrote a program using NIO that reads some data from a channel and
immediately echoes it back to the source. If I telnet to the program
using the OS X telnet client running on the local machine, I can type
a string of any length that I want, and when I hit return, the string
I typed is transmitted and echoed back to my telnet client. If I
telnet using the Windows telnet client, what I type is transmitted and
echoed immediately! It's the same echo program doing this, so I'm
trying to figure out what is going on. Is the difference that the
windows client always transmits immediately while the OS X client
waits until you hit return? Or is there something about NIO that I've
overlooked?

OS X's telnet defaults to line mode. The man page says as much (although i
wouldn't have expected it to work with a simple echo server). You can turn
it off somehow - i think it's on the man page, although i got bored of
reading that before i got to it!

tom
 
E

EJP

Roedy said:
It could be what each client sends as an EOL character and what the
server treats as an EOL character.

No it couldn't. The Telnet line terminator is defined in the RFC.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top