Created
May 19, 2014 06:52
-
-
Save tamx/5109d6016c8201f87a62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net" | |
) | |
func main() { | |
/* | |
tam@wheezy-go:~$ nslookup thinpc-chrome | |
Server: 192.168.7.1 | |
Address: 192.168.7.1#53 | |
Non-authoritative answer: | |
Name: thinpc-chrome.mshome.net | |
Address: 192.168.7.143 | |
*/ | |
// 192.168.7.143(thinpc-chrome) -> OK | |
_, err := net.Dial("tcp4", "192.168.7.143:3389") | |
if err != nil { | |
println("Error1 Connect", err.Error()) | |
} | |
_, err = net.Dial("tcp4", "thinpc-chrome.mshome.net:3389") | |
if err != nil { | |
println("Error2 Connect", err.Error()) | |
} | |
// -> Error2 Connect lookup thinpc-chrome.mshome.net: No address associated with hostname | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment