Class: Quaff::TCPSIPEndpoint
- Inherits:
-
BaseEndpoint
- Object
- BaseEndpoint
- Quaff::TCPSIPEndpoint
- Defined in:
- lib/endpoint.rb
Instance Attribute Summary collapse
-
#sockets ⇒ Object
Returns the value of attribute sockets.
Attributes inherited from BaseEndpoint
#instance_id, #local_hostname, #local_port, #msg_log, #msg_trace, #sdp_port, #sdp_socket, #uri
Instance Method Summary collapse
- #add_sock(sock) ⇒ Object
- #new_source(host, port) ⇒ Object (also: #new_connection)
- #terminate_specific ⇒ Object
- #transport ⇒ Object
Methods inherited from BaseEndpoint
#add_contact_param, #add_contact_uri_param, #contact_header, #create_aka_client, #create_client, #create_server, #get_new_message, #incoming_call, #initialize, #mark_call_dead, #outgoing_call, #register, #remove_contact_param, #remove_contact_uri_param, #send_msg, #set_aka_credentials, #setup_sdp, #terminate, #unregister
Constructor Details
This class inherits a constructor from Quaff::BaseEndpoint
Instance Attribute Details
#sockets ⇒ Object
Returns the value of attribute sockets.
257 258 259 |
# File 'lib/endpoint.rb', line 257 def sockets @sockets end |
Instance Method Details
#add_sock(sock) ⇒ Object
267 268 269 |
# File 'lib/endpoint.rb', line 267 def add_sock sock @sockets.push sock end |
#new_source(host, port) ⇒ Object Also known as: new_connection
263 264 265 |
# File 'lib/endpoint.rb', line 263 def new_source host, port return TCPSource.new host, port end |
#terminate_specific ⇒ Object
271 272 273 274 275 276 277 278 |
# File 'lib/endpoint.rb', line 271 def terminate_specific oldsockets = @sockets.dup @sockets = [] oldsockets.each do |s| s.close unless s.closed? end mycxn = @cxn @cxn = nil mycxn.close end |
#transport ⇒ Object
259 260 261 |
# File 'lib/endpoint.rb', line 259 def transport "TCP" end |