sean_n
3/18/2007 1:36:00 AM
Here's a very simple ruby app that will listen to tcp port 9990. It
works on my client windows xp machine, but when i put it on windows
2000 server, it doesn't work. no port filtering is being done, so i'm
assuming that all ports are available. any suggestions? how do i
find out what ports are available.
require 'socket'
sessions = {}
serv=TCPServer.new('localhost',9990)
puts 'Server running...'
while(session = serv.accept)
command = session.gets
puts command
end