blob: 80d2f7bcb61b8de4780111644b2368abd581630d [file] [log] [blame]
Mark Slee6d7d5952007-01-27 01:44:22 +00001#!/usr/bin/ruby
2
3$:.push('gen-rb')
4$:.push('../../lib/ruby/lib')
5
6require 'thrift/transport/tsocket'
7require 'thrift/protocol/tbinaryprotocol'
8require 'ThriftTest'
9
10s = TSocket.new('localhost', 9090)
11p = TBinaryProtocol.new(s)
12c = ThriftTest::Client.new(p)
13
14s.open()
15
16puts c.testString('string')
17puts c.testByte(8)
18puts c.testByte(-8)
19puts c.testI32(32)
20puts c.testI32(-32)
21puts c.testI64(64)
22puts c.testI64(-64)
23puts c.testDouble(3.14)
24puts c.testDouble(-3.14)
25puts c.testMap({1 => 1, 2 => 2, 3 => 3})
26puts c.testList([1,2,3,4,5])
27puts c.testSet({1 => true, 2 => true, 3 => true})
28
29s.close()
30
31