Class: RubyHome::HAP::HAPResponse
- Inherits:
-
WEBrick::HTTPResponse
- Object
- WEBrick::HTTPResponse
- RubyHome::HAP::HAPResponse
- Defined in:
- lib/ruby_home/hap/hap_response.rb
Instance Method Summary collapse
Instance Method Details
#send_response(session) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ruby_home/hap/hap_response.rb', line 4 def send_response(session) socket = session.socket if session.encryption_time? response = StringIO.new super(response) encrypter = session.encrypter encrypted_response = encrypter.encrypt(response.string).join session.accessory_to_controller_count = encrypter.count _write_data(socket, encrypted_response) else super(socket) end end |