Class: Quaff::UDPSIPEndpoint

Inherits:
BaseEndpoint show all
Defined in:
lib/endpoint.rb

Instance Attribute Summary

Attributes inherited from BaseEndpoint

#instance_id, #msg_log, #msg_trace, #sdp_port, #sdp_socket, #uri

Instance Method Summary collapse

Methods inherited from BaseEndpoint

#add_call_id, #add_sock, #create_aka_client, #create_client, #create_server, #generate_call_id, #get_new_call_id, #get_new_message, #incoming_call, #initialize, #local_port, #mark_call_dead, #outgoing_call, #register, #send_msg, #set_aka_credentials, #setup_sdp, #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



231
232
233
234
235
236
237
# File 'lib/endpoint.rb', line 231

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

#transportObject



227
228
229
# File 'lib/endpoint.rb', line 227

def transport
  "UDP"
end