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
gordoncww-god-0.7.11.1 test/configs/degrading_lambda/tcp_server.rb
jreynolds-god-0.7.13 test/configs/degrading_lambda/tcp_server.rb
jwilkins-god-0.7.9 test/configs/degrading_lambda/tcp_server.rb
mathieuravaux-god-0.7.11 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.10 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.11 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.12 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.13 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.14 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.15 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.16 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.20 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.7 test/configs/degrading_lambda/tcp_server.rb
mojombo-god-0.7.9 test/configs/degrading_lambda/tcp_server.rb
obitum-god-0.7.14.1 test/configs/degrading_lambda/tcp_server.rb
obitum-god-0.7.14 test/configs/degrading_lambda/tcp_server.rb
pjhyett-god-0.7.12 test/configs/degrading_lambda/tcp_server.rb
relevance-god-0.7.12.1 test/configs/degrading_lambda/tcp_server.rb
relevance-god-0.7.12 test/configs/degrading_lambda/tcp_server.rb
saimonmoore-god-0.7.9 test/configs/degrading_lambda/tcp_server.rb