summaryrefslogtreecommitdiff
path: root/sample/drb/http0serv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/drb/http0serv.rb')
-rw-r--r--sample/drb/http0serv.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/sample/drb/http0serv.rb b/sample/drb/http0serv.rb
index 1a58811..2e85331 100644
--- a/sample/drb/http0serv.rb
+++ b/sample/drb/http0serv.rb
@@ -1,6 +1,6 @@
require 'webrick'
require 'drb/drb'
-require 'drb/http0'
+require_relative 'http0'
module DRb
module HTTP0
@@ -61,7 +61,7 @@ module DRb
def accept
client = @queue.pop
- ServerSide.new(client, @config)
+ ServerSide.new(uri, client, @config)
end
def setup_webrick(uri)
@@ -79,12 +79,14 @@ module DRb
end
class ServerSide
- def initialize(callback, config)
+ def initialize(uri, callback, config)
+ @uri = uri
@callback = callback
@config = config
@msg = DRbMessage.new(@config)
@req_stream = StrStream.new(@callback.req_body)
end
+ attr_reader :uri
def close
@callback.close if @callback