From: Stuart Brand Date: 2006-06-07T03:53:24+09:00 Subject: Re: Multiple threads on single port Ok, the final code for this example I have done is require 'socket' port = (ARGV[0] || 123).to_i server = TCPServer.new('localhost', port) threads = [] 10.times do |i| threads[i] = Thread.new { while (session = server.accept) puts "Request: #{session.gets}" session.print "HTTP/1.1 200/OK\r\nContent-type: text/html\r\n\r\n" session.print "

#{Time.now}

\r\n" session.close end } end threads.each { |t| t.join} However, the only stress I can do is the ab apache test, this shows the same 1, 10 or 100 threads, how do I do a proper stress test?? Many thanks Stuart -- Posted via http://www.ruby-forum.com/.