~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to sample/drb/http0.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
      def close; end
48
48
      def alive?; false; end
49
 
      
 
49
 
50
50
      def send_request(ref, msg_id, *arg, &b)
51
51
        stream = StrStream.new
52
52
        @msg.send_request(stream, ref, msg_id, *arg, &b)
53
53
        @reply_stream = StrStream.new
54
54
        post(@uri, stream.buf)
55
55
      end
56
 
      
 
56
 
57
57
      def recv_reply
58
58
        @msg.recv_reply(@reply_stream)
59
59
      end
66
66
        http.post(path, data, {'Content-Type'=>'application/octetstream;'}) do |str|
67
67
          sio.write(str)
68
68
          if @config[:load_limit] < sio.buf.size
69
 
            raise TypeError, 'too large packet' 
 
69
            raise TypeError, 'too large packet'
70
70
          end
71
71
        end
72
72
        @reply_stream = sio