Class: DebugServer::Session

Inherits:
EventMachine::Connection
  • Object
show all
Includes:
Console, Parser
Defined in:
lib/debugserver/session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Console

#print_dump, #print_string, #process_output

Methods included from Parser

#parse_data, #parse_json

Instance Attribute Details

#serverObject

Returns the value of attribute server.



6
7
8
# File 'lib/debugserver/session.rb', line 6

def server
  @server
end

#uidObject

Returns the value of attribute uid.



6
7
8
# File 'lib/debugserver/session.rb', line 6

def uid
  @uid
end

Instance Method Details

#receive_data(buffer) ⇒ Object



8
9
10
11
# File 'lib/debugserver/session.rb', line 8

def receive_data(buffer)
  packets = parse_data(buffer)
  packets.each { |p| process_output(p) }
end

#unbindObject



13
14
15
# File 'lib/debugserver/session.rb', line 13

def unbind
  @server.close_session(self)
end