summaryrefslogtreecommitdiff
path: root/sample/drb/http0serv.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 11:55:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 11:55:52 +0000
commit3a47cf3395dd4c4fe8bdd5df13aab698f2ca314b (patch)
treec4a278220ba8141b829c5c7b0777c1049cfe413c /sample/drb/http0serv.rb
parent39da1b63699faf30c86e753e193c29b81b16136d (diff)
* remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/drb/http0serv.rb')
-rw-r--r--sample/drb/http0serv.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/sample/drb/http0serv.rb b/sample/drb/http0serv.rb
index 100d126..8318123 100644
--- a/sample/drb/http0serv.rb
+++ b/sample/drb/http0serv.rb
@@ -5,7 +5,7 @@ require 'thread'
module DRb
module HTTP0
-
+
def self.open_server(uri, config)
unless /^http:/ =~ uri
raise(DRbBadScheme, uri) unless uri =~ /^http:/
@@ -20,7 +20,7 @@ module DRb
@drb = drb
@queue = Queue.new
end
-
+
def do_POST(req, res)
@req = req
@res = res
@@ -28,7 +28,7 @@ module DRb
@res.body = @queue.pop
@res['content-type'] = 'application/octet-stream;'
end
-
+
def req_body
@req.body
end
@@ -36,7 +36,7 @@ module DRb
def reply(body)
@queue.push(body)
end
-
+
def close
@queue.push('')
end
@@ -78,7 +78,7 @@ module DRb
s.start
end
end
-
+
class ServerSide
def initialize(callback, config)
@callback = callback
@@ -86,7 +86,7 @@ module DRb
@msg = DRbMessage.new(@config)
@req_stream = StrStream.new(@callback.req_body)
end
-
+
def close
@callback.close if @callback
@callback = nil