Sha256: ed5d9c48a638cd78c937c8974d4a4d480d941a2465db2136df348b6fce68efb7
Contents?: true
Size: 365 Bytes
Versions: 1
Compression:
Stored size: 365 Bytes
Contents
# frozen_string_literal: true require 'bundler/setup' require 'polyphony' require 'polyphony/extensions/backtrace' socket = TCPSocket.new('google.com', 80) timer = spin { throttled_loop(20) { STDOUT << '.' } } 5.times do socket.send("GET /?q=time HTTP/1.1\r\nHost: google.com\r\n\r\n", 0) socket.recv(8192) STDOUT << '*' end timer.stop socket.close puts
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
polyphony-0.23 | examples/io/tcpsocket.rb |