Class: OverSIP::SIP::Connection
- Inherits:
-
EM::Connection
- Object
- EM::Connection
- OverSIP::SIP::Connection
- Includes:
- Logger, MessageProcessor
- Defined in:
- lib/oversip/sip/listeners/connection.rb
Direct Known Subclasses
Constant Summary
Constants included from MessageProcessor
Class Attribute Summary collapse
-
.connections ⇒ Object
Returns the value of attribute connections.
-
.invite_client_transactions ⇒ Object
Returns the value of attribute invite_client_transactions.
-
.invite_server_transactions ⇒ Object
Returns the value of attribute invite_server_transactions.
-
.ip ⇒ Object
Returns the value of attribute ip.
-
.ip_type ⇒ Object
Returns the value of attribute ip_type.
-
.non_invite_client_transactions ⇒ Object
Returns the value of attribute non_invite_client_transactions.
-
.non_invite_server_transactions ⇒ Object
Returns the value of attribute non_invite_server_transactions.
-
.outbound_path_fragment ⇒ Object
Returns the value of attribute outbound_path_fragment.
-
.outbound_record_route_fragment ⇒ Object
Returns the value of attribute outbound_record_route_fragment.
-
.port ⇒ Object
Returns the value of attribute port.
-
.record_route ⇒ Object
Returns the value of attribute record_route.
-
.transport ⇒ Object
Returns the value of attribute transport.
-
.via_core ⇒ Object
Returns the value of attribute via_core.
Instance Attribute Summary collapse
-
#cvars ⇒ Object
readonly
Returns the value of attribute cvars.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Connection
constructor
A new instance of Connection.
- #open? ⇒ Boolean
- #receive_senderror(error, data) ⇒ Object
- #transport ⇒ Object
Methods included from Logger
fg_system_msg2str, load_methods, #log_id
Constructor Details
#initialize ⇒ Connection
Returns a new instance of Connection.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/oversip/sip/listeners/connection.rb', line 29 def initialize @parser = ::OverSIP::SIP::MessageParser.new @buffer = ::IO::Buffer.new @state = :init @cvars = {} # Set the socket sending error handling to report the error: # :ERRORHANDLING_KILL, :ERRORHANDLING_IGNORE, :ERRORHANDLING_REPORT self.send_error_handling = :ERRORHANDLING_REPORT end |
Class Attribute Details
.connections ⇒ Object
Returns the value of attribute connections.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def connections @connections end |
.invite_client_transactions ⇒ Object
Returns the value of attribute invite_client_transactions.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def invite_client_transactions @invite_client_transactions end |
.invite_server_transactions ⇒ Object
Returns the value of attribute invite_server_transactions.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def invite_server_transactions @invite_server_transactions end |
.ip ⇒ Object
Returns the value of attribute ip.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def ip @ip end |
.ip_type ⇒ Object
Returns the value of attribute ip_type.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def ip_type @ip_type end |
.non_invite_client_transactions ⇒ Object
Returns the value of attribute non_invite_client_transactions.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def non_invite_client_transactions @non_invite_client_transactions end |
.non_invite_server_transactions ⇒ Object
Returns the value of attribute non_invite_server_transactions.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def non_invite_server_transactions @non_invite_server_transactions end |
.outbound_path_fragment ⇒ Object
Returns the value of attribute outbound_path_fragment.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def outbound_path_fragment @outbound_path_fragment end |
.outbound_record_route_fragment ⇒ Object
Returns the value of attribute outbound_record_route_fragment.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def outbound_record_route_fragment @outbound_record_route_fragment end |
.port ⇒ Object
Returns the value of attribute port.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def port @port end |
.record_route ⇒ Object
Returns the value of attribute record_route.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def record_route @record_route end |
.transport ⇒ Object
Returns the value of attribute transport.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def transport @transport end |
.via_core ⇒ Object
Returns the value of attribute via_core.
9 10 11 |
# File 'lib/oversip/sip/listeners/connection.rb', line 9 def via_core @via_core end |
Instance Attribute Details
#cvars ⇒ Object (readonly)
Returns the value of attribute cvars.
27 28 29 |
# File 'lib/oversip/sip/listeners/connection.rb', line 27 def cvars @cvars end |
Class Method Details
.outbound_listener? ⇒ Boolean
21 22 23 |
# File 'lib/oversip/sip/listeners/connection.rb', line 21 def outbound_listener? @is_outbound_listener end |
.reliable_transport_listener? ⇒ Boolean
17 18 19 |
# File 'lib/oversip/sip/listeners/connection.rb', line 17 def reliable_transport_listener? @is_reliable_transport_listener end |
Instance Method Details
#open? ⇒ Boolean
48 49 50 |
# File 'lib/oversip/sip/listeners/connection.rb', line 48 def open? ! error? end |
#receive_senderror(error, data) ⇒ Object
40 41 42 |
# File 'lib/oversip/sip/listeners/connection.rb', line 40 def receive_senderror error, data log_system_error "Socket sending error: #{error.inspect}, #{data.inspect}" end |
#transport ⇒ Object
44 45 46 |
# File 'lib/oversip/sip/listeners/connection.rb', line 44 def transport self.class.transport end |