Class: OSC::StoppingServer

Inherits:
Server
  • Object
show all
Defined in:
lib/qcmd/core_ext/osc/stopping_server.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ StoppingServer

Returns a new instance of StoppingServer.



3
4
5
6
7
# File 'lib/qcmd/core_ext/osc/stopping_server.rb', line 3

def initialize *args
  @state = :initialized
  @port  = args.first
  super(*args)
end

Instance Method Details

#runObject



9
10
11
12
# File 'lib/qcmd/core_ext/osc/stopping_server.rb', line 9

def run
  @state = :starting
  super
end

#stateObject



20
21
22
# File 'lib/qcmd/core_ext/osc/stopping_server.rb', line 20

def state
  @state
end

#stopObject



14
15
16
17
18
# File 'lib/qcmd/core_ext/osc/stopping_server.rb', line 14

def stop
  @state = :stopping
  stop_detector
  stop_dispatcher
end