summaryrefslogtreecommitdiff
path: root/tutorial/rb
diff options
context:
space:
mode:
authorKevin Clark <kclark@apache.org>2008-06-18 01:03:33 +0000
committerKevin Clark <kclark@apache.org>2008-06-18 01:03:33 +0000
commit21411530da01343bc2da1d6036925494cc93744f (patch)
treead207b8e5c264b8be6878f8a54fb8f83f512faad /tutorial/rb
parent18e21565b3cac739de32ff9af56f09797b20e146 (diff)
downloadthrift-21411530da01343bc2da1d6036925494cc93744f.tar.gz
Update the tutorial files to stop using deprecated names
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668935 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tutorial/rb')
-rwxr-xr-xtutorial/rb/RubyClient.rb8
-rwxr-xr-xtutorial/rb/RubyServer.rb10
2 files changed, 9 insertions, 9 deletions
diff --git a/tutorial/rb/RubyClient.rb b/tutorial/rb/RubyClient.rb
index 69189adc8..d2b9150f4 100755
--- a/tutorial/rb/RubyClient.rb
+++ b/tutorial/rb/RubyClient.rb
@@ -3,16 +3,16 @@
$:.push('../gen-rb')
$:.unshift '../../lib/rb/lib'
-require 'thrift/transport/tsocket'
-require 'thrift/protocol/tbinaryprotocol'
+require 'thrift'
+require 'thrift/protocol/binaryprotocol'
require 'Calculator'
begin
port = ARGV[0] || 9090
- transport = TBufferedTransport.new(TSocket.new('localhost', port))
- protocol = TBinaryProtocol.new(transport)
+ transport = Thrift::BufferedTransport.new(Thrift::Socket.new('localhost', port))
+ protocol = Thrift::BinaryProtocol.new(transport)
client = Calculator::Client.new(protocol)
transport.open()
diff --git a/tutorial/rb/RubyServer.rb b/tutorial/rb/RubyServer.rb
index d78c32387..684d05a4a 100755
--- a/tutorial/rb/RubyServer.rb
+++ b/tutorial/rb/RubyServer.rb
@@ -3,8 +3,8 @@
$:.push('../gen-rb')
$:.unshift '../../lib/rb/lib'
-require 'thrift/transport/tsocket'
-require 'thrift/protocol/tbinaryprotocol'
+require 'thrift'
+require 'thrift/protocol/binaryprotocol'
require 'thrift/server/tserver'
require 'Calculator'
@@ -69,9 +69,9 @@ end
handler = CalculatorHandler.new()
processor = Calculator::Processor.new(handler)
-transport = TServerSocket.new(9090)
-transportFactory = TBufferedTransportFactory.new()
-server = TSimpleServer.new(processor, transport, transportFactory)
+transport = Thrift::ServerSocket.new(9090)
+transportFactory = Thrift::BufferedTransportFactory.new()
+server = Thrift::SimpleServer.new(processor, transport, transportFactory)
puts "Starting the server..."
server.serve()