lib/meimei/client.rb
# Returns the first server that has data to be read.
Returns the first server that has data to be read.
Returns the first server that has data to be read .
def select
      sockets = @servers.map {|x| x.socket}.compact
      socket = Kernel.select(sockets, nil, nil, 1)
      if socket == nil
        return nil
      else
        socket = socket[0][0]
        return @servers.find {|x| x.socket.__id__ == socket.__id__}
      end
    end
def select sockets = @servers . map { | x | x . socket } . compact socket = Kernel . select ( sockets , nil , nil , 1 ) if socket == nil return nil else socket = socket [ 0 ] [ 0 ] return @servers . find { | x | x . socket . __id__ == socket . __id__ } end end
Returns the first server that has data to be read.
Returns the first server that has data to be read .