Class: HTTPClient::DebugSocket

Inherits:
Object
  • Object
show all
Includes:
SocketWrap
Defined in:
lib/httpclient.rb

Overview

HTTPClient::DebugSocket – debugging support

Instance Method Summary collapse

Methods included from SocketWrap

#addr, #closed?, #eof?, #flush, #sync, #sync=

Constructor Details

#initialize(socket, debug_dev) ⇒ DebugSocket

Returns a new instance of DebugSocket.



1099
1100
1101
1102
# File 'lib/httpclient.rb', line 1099

def initialize(socket, debug_dev)
  super(socket)
  @debug_dev = debug_dev
end

Instance Method Details

#<<(str) ⇒ Object



1121
1122
1123
1124
# File 'lib/httpclient.rb', line 1121

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

#closeObject



1104
1105
1106
1107
# File 'lib/httpclient.rb', line 1104

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

#gets(*args) ⇒ Object



1109
1110
1111
1112
1113
# File 'lib/httpclient.rb', line 1109

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

#read(*args) ⇒ Object



1115
1116
1117
1118
1119
# File 'lib/httpclient.rb', line 1115

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