0

I wan't to publish my hostname so that I can access the server from anywhere I want. How can I possibly implement this in golang?

This can be related to defining java.rmi.sever.hostname to my IP address, does golang support this kind of binding?

3
  • How do you expect two different programs running on the same host to resolve the situation when each of them wants to set a different hostname?
    – jnml
    Apr 28, 2013 at 16:49
  • I don't have such kind of scenario. I just have a single server which will accept connections and server requests. If the server is running on, say, my PC at home then I want to access the server from, say, my work place. I can only access it when I'm on the same network that the server is, apparently. But I'm looking for ways in which it can be accessed across the network, if there is one. Apr 28, 2013 at 17:33
  • Weird that your question got moved from stackoverflow to superuser. That doesn't make any sense. What is this? Wikipedia? Jan 15, 2014 at 10:01

1 Answer 1

2

If you want to publish your hostname to DNS you can use a dynamic DNS update to an appropriately configured server with miekg's dns package. If you use dyndns then there's a dyndns go client, too, that you probably can adapt to be part of your program.

If you just want to publicize your service on the local network, then at least for Linux and OS X (including iOS) clients you can do it with multicast dns.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .