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
#contact_header, #instance_id, #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
#create_aka_client, #create_client, #create_server, #get_new_message, #incoming_call, #initialize, #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 Attribute Details
#sockets ⇒ Object
Returns the value of attribute sockets.
232 233 234 |
# File 'lib/endpoint.rb', line 232 def sockets @sockets end |
Instance Method Details
#add_sock(sock) ⇒ Object
242 243 244 |
# File 'lib/endpoint.rb', line 242 def add_sock sock @sockets.push sock end |
#new_source(host, port) ⇒ Object Also known as: new_connection
238 239 240 |
# File 'lib/endpoint.rb', line 238 def new_source host, port return TCPSource.new host, port end |
#terminate_specific ⇒ Object
246 247 248 249 250 251 252 253 |
# File 'lib/endpoint.rb', line 246 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
234 235 236 |
# File 'lib/endpoint.rb', line 234 def transport "TCP" end |