Method: HomeQ::CP::Server#start
- Defined in:
- lib/homeq/cp/server.rb
#start ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/homeq/cp/server.rb', line 53 def start begin @signature = EventMachine.start_server(@host, @port, CP::Connection) { |conn| conn.server = self } rescue Exception => e msg = "Error starting CP listener #{@host}:#{@port}. " + "Likely it's a config error. " + "Original error: #{e.}" Base::System.instance.die(msg) else logger.info { "Control port running on #{@host}:#{@port}" } end end |