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_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 ⇒ 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, #unregister
Constructor Details
This class inherits a constructor from Quaff::BaseEndpoint
Instance Attribute Details
#sockets ⇒ Object
Returns the value of attribute sockets.
204 205 206 |
# File 'lib/endpoint.rb', line 204 def sockets @sockets end |
Instance Method Details
#add_sock(sock) ⇒ Object
214 215 216 |
# File 'lib/endpoint.rb', line 214 def add_sock sock @sockets.push sock end |
#new_source(host, port) ⇒ Object Also known as: new_connection
210 211 212 |
# File 'lib/endpoint.rb', line 210 def new_source host, port return TCPSource.new host, port end |
#terminate ⇒ Object
218 219 220 221 222 223 224 225 |
# File 'lib/endpoint.rb', line 218 def terminate oldsockets = @sockets.dup @sockets = [] oldsockets.each do |s| s.close unless s.closed? end mycxn = @cxn @cxn = nil mycxn.close end |
#transport ⇒ Object
206 207 208 |
# File 'lib/endpoint.rb', line 206 def transport "TCP" end |