On Oct 4, 2006, at 10:50 AM, Alex Fenton wrote:
> I'd like to use druby, but with the client using just an IP address  
> to contact the server, and vice versa. The initial connection works  
> fine, but then it seems the server can't find the client to send a  
> reply when a method is invoked.
>
> I realise this question has been asked before, and answered by 'fix  
> your DNS' or 'tweak etc/hosts'.
> However, this is for an end-user app, so most users (of clients and  
> servers) won't be permitted to access etc/hosts, even if I wanted  
> to explain what they should do to it.
>
> So
> - has anyone hacked drb to work without hostnames?

DRb uses Socket.gethostname to determine the hostname.  If you don't  
otherwise use this method just override it to return an IP address.

> - failing that, is there a deep technical reason that using IP  
> addresses only will never work and I shouldn't bother even trying?  
> It seems lots of other net applications work fine without caring  
> that DNS is fixed, but I've not got masses of experience with  
> socket programming in Ruby.

Most programs aren't servers that are running on arbitrary machines  
having other arbitrary machines connecting back to them.

One solution would be adding socket multiplexing in place of  
launching servers.

-- 
Eric Hodel - drbrain / segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com