From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-10-07T07:42:17+09:00 Subject: [ruby-talk:22177] Re: dRuby, Linux and ports In article , Phil Tomson wrote: >In article <01100623231217.00793@linux>, >Armin Roehrl wrote: >>No idea. >>please email the code. > >OK, here's the latest thing I tried, the simple web server on page 478 of >Pickaxe (under TCPServer): > >#websrv.rb >require 'socket' >port = 80 > OK, when I replace this line: >server = TCPServer.new('localhost',port) with: server = TCPServer.new(port) it works fine. >puts "started server on port #{port}" >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 websrv.rb > Why? Now to figure out how to get dRuby to work. Phil