Sha256: 1c5957ae239088f670607b60e627f82db76fc55c968c250517b52fcd211465a8
Contents?: true
Size: 349 Bytes
Versions: 1
Compression:
Stored size: 349 Bytes
Contents
# frozen_string_literal: true require 'bundler/setup' require 'polyphony/http' $throttler = throttle(1000) opts = { reuse_addr: true, dont_linger: true } spin { Polyphony::HTTP::Server.serve('0.0.0.0', 1234, opts) do |req| $throttler.call { req.respond("Hello world!\n") } end } puts "pid: #{Process.pid}" puts "Listening on port 1234..."
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
polyphony-0.19 | examples/http/http_server_throttled.rb |