NIO and Telnet

I have read blah3 tuts, very nice, though what is “Funnily”? :wink:

Anyway, I pulled down the sample from Sun at http://access1.sun.com/codesamples/Selectors/selectors.html and when testing with telnet, telnet always says could not open connection to host. So I pulled a few more samples down and same issue.

My old IO game servers work fine and I can telnet to them. Any thoughts?

EDIT: Have not figured out why, but found some code that works with telnet. SO now to review the set ans see if I can make a learning experience out of figuring out why the others did not work! :slight_smile:

EDIT: Figured out the problem now to code!

What was it?

Well…

I found that the machine I am testing on returns mahinename/ip from the line:

InetAddress lh = InetAddress.getLocalHost();

And I was trygint to telnet to 127.0.0.1 port#. Once I switched to telnet machinename port# all was well!

Newb-itus. :slight_smile: