Class: ANTLR3::Debug::RemoteEventSocketListener

Inherits:
Thread
  • Object
show all
Defined in:
lib/antlr3/debug/socket.rb

Overview

A debugging event listener which intercepts debug event messages sent by a EventSocketProxy over an IP socket.

Constant Summary collapse

ESCAPE_MAP =
Hash.new { |h, k| k }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ RemoteEventSocketListener

Returns a new instance of RemoteEventSocketListener.


274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'lib/antlr3/debug/socket.rb', line 274

def initialize( options = {} )
  @listener = listener
  @host = options.fetch( :host, 'localhost' )
  @port = options.fetch( :port, DEFAULT_PORT )
  @buffer = StringIO.new
  super do
    connect do
      handshake
      loop do
        yield( read_event )
      end
    end
  end
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host


272
273
274
# File 'lib/antlr3/debug/socket.rb', line 272

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port


272
273
274
# File 'lib/antlr3/debug/socket.rb', line 272

def port
  @port
end