Module: EMRPC::DebugConnection

Defined in:
lib/emrpc/evented_api/debug_connection.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.idObject

Returns the value of attribute id.



5
6
7
# File 'lib/emrpc/evented_api/debug_connection.rb', line 5

def id
  @id
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/emrpc/evented_api/debug_connection.rb', line 8

def id
  @id
end

Instance Method Details

#_debug(m) ⇒ Object



11
12
13
# File 'lib/emrpc/evented_api/debug_connection.rb', line 11

def _debug(m)
  puts "# Connection #{@id}: #{m}"
end

#connection_completedObject



21
22
23
24
# File 'lib/emrpc/evented_api/debug_connection.rb', line 21

def connection_completed
  _debug "connection_completed"
  super
end

#post_initObject



15
16
17
18
19
# File 'lib/emrpc/evented_api/debug_connection.rb', line 15

def post_init
  @id ||= (DebugConnection.id += 1)
  _debug "post_init"
  super
end

#receive_handshake_message(msg) ⇒ Object



31
32
33
34
# File 'lib/emrpc/evented_api/debug_connection.rb', line 31

def receive_handshake_message(msg)
  _debug "receive_handshake_message(#{msg.inspect})"
  super
end

#receive_regular_message(msg) ⇒ Object



36
37
38
39
# File 'lib/emrpc/evented_api/debug_connection.rb', line 36

def receive_regular_message(msg)
  _debug "receive_regular_message(#{msg.inspect})"
  super
end

#rescue_marshal_error(e) ⇒ Object



41
42
43
44
# File 'lib/emrpc/evented_api/debug_connection.rb', line 41

def rescue_marshal_error(e)
  _debug "rescue_marshal_error(#{e.inspect})"
  super
end

#send_handshake_message(arg) ⇒ Object



26
27
28
29
# File 'lib/emrpc/evented_api/debug_connection.rb', line 26

def send_handshake_message(arg)
  _debug "send_handshake_message(#{arg.inspect})"
  super
end

#unbindObject



46
47
48
49
# File 'lib/emrpc/evented_api/debug_connection.rb', line 46

def unbind
  _debug "unbind"
  super
end