Maintenance of Ruby 2.0.0 ended on February 24, 2016. Read more

In Files

  • drb/gw.rb


Gateway id conversion forms a gateway between different DRb protocols or networks.

The gateway needs to install this id conversion and create servers for each of the protocols or networks it will be a gateway between. It then needs to create a server that attaches to each of these networks. For example:

require 'drb/drb'
require 'drb/unix'
require 'drb/gw'

gw =
s1 = 'drbunix:/path/to/gateway', gw
s2 = 'druby://example:10000', gw


Each client must register services with the gateway, for example:

DRb.start_service 'drbunix:', nil # an anonymous server
gw = nil, 'drbunix:/path/to/gateway'
gw[:unix] = some_service

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit