--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  name: async_thread
  rw: RW
class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Represents a HTTP response to an asynchronous request. Async methods of HTTPClient such as get_async, post_async, etc. returns an instance of Connection.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: How to use
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: Invoke HTTP method asynchronously and check if it's been finished periodically.
  - !ruby/struct:SM::Flow::VERB 
    body: " connection = clnt.post_async(url, body)\n print 'posting.'\n while true\n   break if connection.finished?\n   print '.'\n   sleep 1\n end\n puts '.'\n res = connection.pop\n p res.status\n"
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: Read the response as an IO.
  - !ruby/struct:SM::Flow::VERB 
    body: " connection = clnt.get_async('http://dev.ctor.org/')\n io = connection.pop.content\n while str = io.read(40)\n   p str\n end\n"
  type: :NUMBER
constants: []

full_name: HTTPClient::Connection
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: finished?
- !ruby/object:RI::MethodSummary 
  name: join
- !ruby/object:RI::MethodSummary 
  name: pop
name: Connection
superclass: Object
