I have a while
loop consistently listening to incoming connections and outputting them to console. I would like to be able to issue commands via the console without affecting the output. I ve tried:
Thread.new do
while true
input = gets.chomp
puts "So I herd u sed, "#{input}"."
#Commands would be in this scope
end
end
然而,这似乎预留了我的全稿,直到收到投入为止;即便如此,一些读物也随之消失。 我在这样做之前就已经开始了。 I ve Trial look at TCPSocket s select(
methods to no effect.