From: Brian Candler Date: 2011-02-23T06:25:59+09:00 Subject: Re: Using Ruby to connect with multiple IP Input output interface, Netiom. Nick Jackson wrote in post #982927: > require 'socket' > server = TCPServer.open(3012) > @socket = server.accept If this is a server waiting for incoming connections from the device (as it appears to be), you can accept multiple connections and handle each one in its own Thread. There's code in the standard library which does that for you: see gserver.rb Not that it's hard to do in straight Ruby: while s = server.accept Thread.new(s) do |socket| ... do stuff with socket end end -- Posted via http://www.ruby-forum.com/.