def listen(socket_port, &block)
      raise ArgumentError, 'Missing listener block' unless block_given?
      raise Exceptions::Application, 'Already listening' if listening
      begin
        @conn = EM.start_server('127.0.0.1', socket_port, ServerInputHandler, block)
      rescue Exception => e
        raise Exceptions::IO, 'Listen port unavailable' if e.message =~ /no acceptor/
      end
      true
    end
def listen(socket_port, &block)
      raise ArgumentError, 'Missing listener block' unless block_given?
      raise Exceptions::Application, 'Already listening' if listening
      begin
        @conn = EM.start_server('127.0.0.1', socket_port, ServerInputHandler, block)
      rescue Exception => e
        raise Exceptions::IO, 'Listen port unavailable' if e.message =~ /no acceptor/
      end
      true
    end
Open command socket and wait for input on it
 This can only be called again after 'stop_listening' was called

 === Parameters
 socket_port(Integer):: Socket port on which to listen

 === Block
 The given block should take two arguments:
   * First argument will be given the commands sent through the socket
     Commands should be serialized using RightScale::CommandSerializer.
   * Second argument contains the connection that should be given back to
     +reply+ to send reply

 === Return
 true:: Always return true

 === Raise
 (ArgumentError):: If block is missing
 (Exceptions::Application):: If +listen+ has already been called and +stop+ hasn't since
 (Exceptions::Application):: If port is already bound