Class: FCSHD::Server::Client
- Inherits:
-
Struct
- Object
- Struct
- FCSHD::Server::Client
- Defined in:
- lib/fcshd/server.rb
Instance Attribute Summary collapse
-
#compiler ⇒ Object
Returns the value of attribute compiler.
-
#socket ⇒ Object
Returns the value of attribute socket.
Instance Method Summary collapse
Instance Attribute Details
#compiler ⇒ Object
Returns the value of attribute compiler
21 22 23 |
# File 'lib/fcshd/server.rb', line 21 def compiler @compiler end |
#socket ⇒ Object
Returns the value of attribute socket
21 22 23 |
# File 'lib/fcshd/server.rb', line 21 def socket @socket end |
Instance Method Details
#run! ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/fcshd/server.rb', line 22 def run! case command = socket.gets.chomp when /^(mxmlc|compc) / compiler.compile! command, socket when "restart" compiler.restart! socket.puts "fcshd: compiler restarted" when "sdk-version" socket.puts compiler.sdk_version else socket.puts "fcshd: unrecognized command: #{command}" end rescue Errno::EPIPE logger.log "Broken pipe." ensure socket.close end |