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



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

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

#closeObject



407
408
409
410
# File 'lib/httpclient/session.rb', line 407

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

#debug_dev=(debug_dev) ⇒ Object



403
404
405
# File 'lib/httpclient/session.rb', line 403

def debug_dev=(debug_dev)
  @debug_dev = debug_dev
end

#gets(*args) ⇒ Object



412
413
414
415
416
# File 'lib/httpclient/session.rb', line 412

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

#read(*args) ⇒ Object



418
419
420
421
422
# File 'lib/httpclient/session.rb', line 418

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

#readpartial(*args) ⇒ Object



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

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