⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (393 Bytes)
Bug #2339
» server.rb
pierre@mouraf.org (Pierre-Alexandre Meyer)
, 11/06/2009 02:44 AM
require
'drb/drb'
# The URI for the server to connect to
URI
=
"druby://localhost:8787"
class
TimeServer
def
get_current_time
return
Time
.
now
end
end
# The object that handles requests on the server
FRONT_OBJECT
=
TimeServer
.
new
$SAFE
=
1
# disable eval() and friends
DRb
.
start_service
(
URI
,
FRONT_OBJECT
)
# Wait for the drb server thread to finish before exiting.
DRb
.
thread
.
join
« Previous
1
2
3
4
Next »
(2-2/4)
Loading...