Method: Diameter::Stack#send_answer
- Defined in:
- lib/diameter/stack.rb
#send_answer(ans, original_cxn) ⇒ Object
Sends a Diameter answer. This is sent over the same connection the request was received on (which needs to be passed into to this method).
This adds this stack’s Origin-Host and Origin-Realm AVPs, if those AVPs don’t already exist.
257 258 259 260 261 |
# File 'lib/diameter/stack.rb', line 257 def send_answer(ans, original_cxn) fail "Must pass an answer" unless ans.answer ans.add_origin_host_and_realm(@local_host, @local_realm) @tcp_helper.send(ans.to_wire, original_cxn) end |