Sha256: d02901bf1aece02b4e20350a8b148f58828ef7b3a3d85bebc4435e41e58a5121

Contents?: true

Size: 402 Bytes

Versions: 22

Compression:

Stored size: 402 Bytes

Contents

# frozen_string_literal: true

require 'bundler/setup'
require 'tipi'

opts = {
  reuse_addr:  true,
  dont_linger: true
}

puts "pid: #{Process.pid}"
puts 'Listening on port 4411...'

spin do
  Tipi.serve('0.0.0.0', 4411, opts) do |req|
    body = req.read
    body2 = req.read
    req.respond("body: #{body} (body2: #{body2.inspect})\n")
  rescue Exception => e
    p e
  end
  p 'done...'
end.await

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
tipi-0.55 examples/http_server_form.rb
tipi-0.54 examples/http_server_form.rb
tipi-0.53 examples/http_server_form.rb
tipi-0.52 examples/http_server_form.rb
tipi-0.51 examples/http_server_form.rb
tipi-0.50 examples/http_server_form.rb
tipi-0.49 examples/http_server_form.rb
tipi-0.47 examples/http_server_form.rb
tipi-0.46 examples/http_server_form.rb
tipi-0.45 examples/http_server_form.rb
tipi-0.43 examples/http_server_form.rb
tipi-0.42 examples/http_server_form.rb
tipi-0.41 examples/http_server_form.rb
tipi-0.40 examples/http_server_form.rb
tipi-0.39 examples/http_server_form.rb
tipi-0.38 examples/http_server_form.rb
tipi-0.37.2 examples/http_server_form.rb
tipi-0.37.1 examples/http_server_form.rb
tipi-0.37 examples/http_server_form.rb
tipi-0.36 examples/http_server_form.rb