Sha256: e76dfdd9200ee45b0513edf5c11f6c8ed2a420f9b09af571a18639810765401e

Contents?: true

Size: 271 Bytes

Versions: 9

Compression:

Stored size: 271 Bytes

Contents

require "lib/em-synchrony"
require "net/http"

$VERBOSE = nil

EM.synchrony do
  # monkey patch default Socket code to use EventMachine Sockets instead
  TCPSocket = EventMachine::Synchrony::TCPSocket

  Net::HTTP.get_print 'www.google.com', '/index.html'

  EM.stop
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
em-synchrony-1.0.6 examples/nethttp.rb
em-synchrony-1.0.5 examples/nethttp.rb
em-synchrony-1.0.4 examples/nethttp.rb
em-synchrony-1.0.3 examples/nethttp.rb
em-synchrony-1.0.2 examples/nethttp.rb
em-synchrony-1.0.1 examples/nethttp.rb
em-synchrony-1.0.0 examples/nethttp.rb
em-synchrony-0.3.0.beta.1 examples/nethttp.rb
em-synchrony-0.2.0 examples/nethttp.rb