Class: Quaff::TCPSIPEndpoint

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

Instance Attribute Summary collapse

Attributes inherited from BaseEndpoint

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

Instance Method Summary collapse

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

#socketsObject

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_specificObject



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

#transportObject



234
235
236
# File 'lib/endpoint.rb', line 234

def transport
  "TCP"
end