Module: HTTPClient::DebugSocket

Extended by:
SocketWrap
Defined in:
lib/httpclient/session.rb

Overview

Module for intercepting Socket methods and dumps in/out to given debugging device. debug_dev must respond to <<.

Instance Method Summary collapse

Methods included from SocketWrap

closed?, eof?, flush, initialize, sync, sync=

Instance Method Details

#<<(str) ⇒ Object



448
449
450
451
# File 'lib/httpclient/session.rb', line 448

def <<(str)
  super
  debug(str)
end

#closeObject



425
426
427
428
# File 'lib/httpclient/session.rb', line 425

def close
  super
  debug("! CONNECTION CLOSED\n")
end

#debug_dev=(debug_dev) ⇒ Object



421
422
423
# File 'lib/httpclient/session.rb', line 421

def debug_dev=(debug_dev)
  @debug_dev = debug_dev
end

#gets(*args) ⇒ Object



430
431
432
433
434
# File 'lib/httpclient/session.rb', line 430

def gets(*args)
  str = super
  debug(str)
  str
end

#read(*args) ⇒ Object



436
437
438
439
440
# File 'lib/httpclient/session.rb', line 436

def read(*args)
  str = super
  debug(str)
  str
end

#readpartial(*args) ⇒ Object



442
443
444
445
446
# File 'lib/httpclient/session.rb', line 442

def readpartial(*args)
  str = super
  debug(str)
  str
end