Class: DRb::GWIdConv (Ruby 2.7.2)
Description: Class : DRb::GWIdConv - Ruby 2.7.2

### Home Classes Methods

### In Files

- drb/gw.rb

### Parent

DRb::DRbIdConv

### Class/Module Index

Quicksearch

- ACL
- ACL::ACLEntry
- ACL::ACLList
- DRb
- DRb::DRbArray
- DRb::DRbBadScheme
- DRb::DRbBadURI
- DRb::DRbConn
- DRb::DRbConnError
- DRb::DRbError
- DRb::DRbIdConv
- DRb::DRbIdConv
- DRb::DRbMessage
- DRb::DRbObject
- DRb::DRbObject
- DRb::DRbObservable
- DRb::DRbProtocol
- DRb::DRbRemoteError
- DRb::DRbSSLSocket
- DRb::DRbSSLSocket::SSLConfig
- DRb::DRbServerNotFound
- DRb::DRbTCPSocket
- DRb::DRbUNIXSocket
- DRb::DRbUndumped
- DRb::DRbUndumped
- DRb::DRbUnknown
- DRb::DRbUnknownError
- DRb::ExtServ
- DRb::ExtServManager
- DRb::GW
- DRb::GWIdConv
- DRb::Thread
- DRb::ThreadObject
- DRb::TimerIdConv
- DRb::TimerIdConv::TimerHolder2
- DRb::TimerIdConv::TimerHolder2::InvalidIndexError
- DRb::WeakIdConv
- DRb::WeakIdConv::WeakSet
- Object

No matching classes.

# DRb::GWIdConv

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'

    DRb.install_id_conv DRb::GWIdConv.new
    gw = DRb::GW.new
    s1 = DRb::DRbServer.new 'drbunix:/path/to/gateway', gw
    s2 = DRb::DRbServer.new 'druby://example:10000', gw

    s1.thread.join
    s2.thread.join

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

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