Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

EventMachine + Fiber aware XMLRPC client

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 em-xmlrpc-client.gemspec
README.rdoc

em-xmlrpc-client

This gem monkey patches Ruby's built in XMLRPC::Client to be EventMachine + Fiber aware. If you are not using EventMachine (or the reactor isn't running), then it will fallback to using XMLRPC::Client's default implemenation (using Net::HTTP).

Example

require "eventmachine"
require "em-xmlrpc-client"

EM.run do
  Fiber.new do
    client = XMLRPC::Client.new2("http://blah.com/api")
    result = client.call("someMethod", "arg1", 123) # Uses em-http-request.
  end.resume
end

client = XMLRPC::Client.new2("http://blah.com/api")
result = client.call("someMethod", "arg1", 123) # Uses Net::HTTP like normal.

Dependencies

em-http-request is required if you want to use the EventMachine + Fiber aware implementation.

Author

Christopher J. Bottaro

https://github.com/cjbottaro

@cjbottaro

Something went wrong with that request. Please try again.