Sha256: af0e44e25b19fd5b06664842bcea6c7c0ff96f74055c58cfa1ab45570be84d89

Contents?: true

Size: 345 Bytes

Versions: 84

Compression:

Stored size: 345 Bytes

Contents

#! /usr/bin/env ruby

require 'socket'
server = TCPServer.new('127.0.0.1', 9090)
while (session = server.accept)
  puts "Found a session"
  request = session.gets
  puts "Request: #{request}"
  time = request.to_i
  puts "Sleeping for #{time}"
  sleep time
  session.print "Slept for #{time} seconds"
  session.close
  puts "Session closed"
end

Version data entries

84 entries across 84 versions & 23 rubygems

Version Path
resurrected_god-0.14.0 test/configs/degrading_lambda/tcp_server.rb
mcproc-2016.2.20 test/configs/degrading_lambda/tcp_server.rb
god-0.13.7 test/configs/degrading_lambda/tcp_server.rb
god-0.13.6 test/configs/degrading_lambda/tcp_server.rb
god-0.13.5 test/configs/degrading_lambda/tcp_server.rb
dguettler-god-0.7.13.2 test/configs/degrading_lambda/tcp_server.rb
dguettler-god-0.7.13.3 test/configs/degrading_lambda/tcp_server.rb
dosire-god-0.7.10 test/configs/degrading_lambda/tcp_server.rb
dosire-god-0.7.12 test/configs/degrading_lambda/tcp_server.rb
dosire-god-0.7.9 test/configs/degrading_lambda/tcp_server.rb
dunedain289-god-0.7.12.1 test/configs/degrading_lambda/tcp_server.rb
dustin-god-0.7.7.1 test/configs/degrading_lambda/tcp_server.rb
eric-god-0.7.10 test/configs/degrading_lambda/tcp_server.rb
eric-god-0.7.11 test/configs/degrading_lambda/tcp_server.rb
eric-god-0.7.12 test/configs/degrading_lambda/tcp_server.rb
eric-god-0.7.14 test/configs/degrading_lambda/tcp_server.rb
eric-god-0.7.7 test/configs/degrading_lambda/tcp_server.rb
fotonauts-god-0.7.10 test/configs/degrading_lambda/tcp_server.rb
fotonauts-god-0.7.12 test/configs/degrading_lambda/tcp_server.rb
gohanlonllc-god-0.7.9 test/configs/degrading_lambda/tcp_server.rb