--hxkXGo8AKqTJ+9QI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

ahoward (ahoward / fsl.noaa.gov) wrote:

> On Wed, 5 Feb 2003, Eric Hodel wrote:
> 
> > Note that DRb does the right thing with this:
> >
> > require 'drb'
> >
> > DRb.start_service('druby://localhost:5000', File.new('server.rb'))
> > DRb.thread.join
> 
> i assume this means you can define your server class in a file and serve it
> that way?  does that then mean it would be inpossible to distribute, for
> example, a log file?

No, you just get a File object back.  I should have included the client
code:

require 'drb'

DRb.start_service
obj = DRbObject.new(nil, 'druby://localhost:5000')

p obj # => DRBObject
p obj.read # => file contents
obj.close # must close, as server won't do it until exit

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04


--hxkXGo8AKqTJ+9QI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (FreeBSD)

iD8DBQE+QBFLMypVHHlsnwQRAmBIAJ9zw0omgvvovxlFSvv1HELH6w51uQCg6eTN
OWdWiLVrIwRHUBHt430qN/wH
-----END PGP SIGNATURE-----

--hxkXGo8AKqTJ+9QI--