Class: Quaff::UDPSIPEndpoint
- Inherits:
-
BaseEndpoint
- Object
- BaseEndpoint
- Quaff::UDPSIPEndpoint
- Defined in:
- lib/endpoint.rb
Instance Attribute Summary
Attributes inherited from BaseEndpoint
Instance Method Summary collapse
- #new_source(host, port) ⇒ Object (also: #new_connection)
- #transport ⇒ Object
Methods inherited from BaseEndpoint
#add_call_id, #add_sock, #generate_call_id, #get_new_call_id, #get_new_message, #incoming_call, #initialize, #local_port, #mark_call_dead, #outgoing_call, #register, #send_msg, #terminate, #unregister
Constructor Details
This class inherits a constructor from Quaff::BaseEndpoint
Instance Method Details
#new_source(host, port) ⇒ Object Also known as: new_connection
193 194 195 196 197 198 199 |
# File 'lib/endpoint.rb', line 193 def new_source host, port if /^(\d+\.){3}\d+$/ =~ host return UDPSource.new host, port else return UDPSource.new @resolver.getaddress(host).to_s, port end end |
#transport ⇒ Object
189 190 191 |
# File 'lib/endpoint.rb', line 189 def transport "UDP" end |