Sha256: fc0cb0e1e58611bb646f2abea7c9519340f6011d234b5cbaac3e5e763f0675c6

Contents?: true

Size: 1.88 KB

Versions: 1

Compression:

Stored size: 1.88 KB

Contents

h1. evdispatch

<h4 style="float:right;padding-right:10px;">&#x2192; &#8216;evdispatch&#8217;</h4>


h2. What

A library for making http requests in parallel.  Uses the libev library to run
an event loop on a background posix thread, that uses libcurls multi interface
to issue HTTP requests.

h2. Installing

<pre syntax="ruby">sudo gem install evdispatch</pre>

h2. The basics


h2. Demonstration of usage

<pre syntax="ruby">
require 'rubygems'
require 'evdispatch'

# create a new dispatch loop
d = Evdispatch::Loop.new

# start the event loop thread
d.start

# send a dispatch http request and store a handle to the request
google_id = d.request_http("http://www.google.com/")

# do some processing and later on check for the response
response = d.response( google_id )

puts response[:response_time]
puts response[:body]

# sometime later you can stop the event loop
d.stop
</pre>


h2. Forum

"http://groups.google.com/group/evdispatch":http://groups.google.com/group/evdispatch

h2. How to submit patches

Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.

The trunk repository is <a href="http://evdispatch.rubyforge.org/svn/trunk/">http://evdispatch.rubyforge.org/svn/trunk</a> for anonymous access.

h2. F.A.Q.

<ul>
<li><h5> I get an error when installing the gem: <strong>"error: 'curl_socket_t' has not been
  declared"</strong></h5>
  <p> You need to have at least version 7.16 of <a href="http://curl.haxx.se/download.html">libcurl</a>.  I recommend at least version: 7.18.1.</p>
</li>
</ul>

h2. License

This code is free to use under the terms of the MIT license. 

h2. Contact

Comments are welcome. See the "forum":http://groups.google.com/group/evdispatch

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
evdispatch-0.1.2 website/index.txt