Sha256: 50b3e4ca9454495a4b2744988d23b5de46fb13bff1309766445bd3e346e73d5d

Contents?: true

Size: 359 Bytes

Versions: 27

Compression:

Stored size: 359 Bytes

Contents

# frozen_string_literal: true

require 'bundler/setup'
require 'polyphony'

Exception.__disable_sanitized_backtrace__ = true

buffer = +''
socket = TCPSocket.new('google.com', 80)
socket.send("GET /?q=time HTTP/1.1\r\nHost: google.com\r\n\r\n", 0)
move_on_after(5) {
  while (data = socket.readpartial(8192))
    buffer << data
  end
}

puts "*" * 40
p buffer

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
polyphony-0.45.0 examples/core/xx-readpartial.rb
polyphony-0.44.0 examples/core/xx-readpartial.rb
polyphony-0.43.11 examples/core/xx-readpartial.rb
polyphony-0.43.10 examples/core/xx-readpartial.rb
polyphony-0.43.9 examples/core/xx-readpartial.rb
polyphony-0.43.8 examples/core/xx-readpartial.rb
polyphony-0.43.6 examples/core/xx-readpartial.rb
polyphony-0.43.5 examples/core/xx-readpartial.rb
polyphony-0.43.4 examples/core/xx-readpartial.rb
polyphony-0.43.3 examples/core/xx-readpartial.rb
polyphony-0.43.2 examples/core/xx-readpartial.rb
polyphony-0.43.1 examples/core/xx-readpartial.rb
polyphony-0.43 examples/core/xx-readpartial.rb
polyphony-0.42 examples/core/xx-readpartial.rb
polyphony-0.41 examples/core/xx-readpartial.rb
polyphony-0.40 examples/core/xx-readpartial.rb
polyphony-0.39 examples/core/xx-readpartial.rb
polyphony-0.38 examples/core/xx-readpartial.rb
polyphony-0.36 examples/core/xx-readpartial.rb
polyphony-0.34 examples/core/xx-readpartial.rb