Class: Palmade::Tapsilog::Protocol

Inherits:
EventMachine::Connection
  • Object
show all
Defined in:
lib/palmade/tapsilog/protocol.rb

Constant Summary collapse

Ci =
'i'.freeze
Rcolon =
/:/
MaxMessageLength =
8192
LoggerClass =
Palmade::Tapsilog::Server

Instance Method Summary collapse

Instance Method Details

#post_initObject



9
10
11
# File 'lib/palmade/tapsilog/protocol.rb', line 9

def post_init
  setup
end

#receive_data(data) ⇒ Object



20
21
22
23
# File 'lib/palmade/tapsilog/protocol.rb', line 20

def receive_data(data)
  @logchunk << data
  process_data
end

#setupObject



13
14
15
16
17
18
# File 'lib/palmade/tapsilog/protocol.rb', line 13

def setup
  @length = nil
  @logchunk = ''
  @authenticated = nil
  @use_analogger_protocol = false
end