c# - Sending data to 127.* : Unreachable Host -


i'm trying send loopback address space in .net 3.5 application running on windows xp. code simple:

receiver = new ipendpoint(ipaddress.parse("127.0.0.2"), 8000); sock.sendto(data, len, socketflags.none, receiver); 

when run code unreachable host socket exception. seems strange me because loopback interface around, , shouldn't generate unreachable host exceptions.

windows 7 executes code fine, making problem stranger.

so -- if has tips on getting working in xp, i'd appreciate it.

edit:

some info:

  • something listening on 127.0.0.2, netstat shows:
  • udp 127.0.0.2:8000 : 5824

  • i running xp sp3, , there no firewall on test machine

i'm noticing on xp when ping 127.0.0.2, replies come back:

reply 127.0.0.1 

on windows 7 reply comes address pinged:

reply 127.0.0.2 

i'm thinking issue , such it's not programming problem, it's more of problem xp itself...

-- dan

does work 127.0.0.1? the rfc says:

127.0.0.0/8 - block assigned use internet host loopback address. datagram sent higher level protocol address anywhere within block should loop inside host. ordinarily implemented using 127.0.0.1/32 loopback, no addresses within block should ever appear on network anywhere [rfc1700, page 5].

that seems indicate shouldn't rely on 127.0.0.2 working, unless you've set up.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -