module HTTPClient::SocketWrap
Wraps up a Socket for method interception.
Public Class Methods
new(socket, *args)
click to toggle source
Calls superclass method
# File lib/httpclient/session.rb, line 414 def initialize(socket, *args) super(*args) @socket = socket end
Public Instance Methods
<<(str)
click to toggle source
# File lib/httpclient/session.rb, line 448 def <<(str) @socket << str end
close()
click to toggle source
# File lib/httpclient/session.rb, line 419 def close @socket.close end
closed?()
click to toggle source
# File lib/httpclient/session.rb, line 423 def closed? @socket.closed? end
eof?()
click to toggle source
# File lib/httpclient/session.rb, line 427 def eof? @socket.eof? end
flush()
click to toggle source
# File lib/httpclient/session.rb, line 452 def flush @socket.flush end
gets(*args)
click to toggle source
# File lib/httpclient/session.rb, line 431 def gets(*args) @socket.gets(*args) end
read(*args)
click to toggle source
# File lib/httpclient/session.rb, line 435 def read(*args) @socket.read(*args) end
readpartial(*args)
click to toggle source
# File lib/httpclient/session.rb, line 439 def readpartial(*args) # StringIO doesn't support :readpartial if @socket.respond_to?(:readpartial) @socket.readpartial(*args) else @socket.read(*args) end end
sync()
click to toggle source
# File lib/httpclient/session.rb, line 456 def sync @socket.sync end
sync=(sync)
click to toggle source
# File lib/httpclient/session.rb, line 460 def sync=(sync) @socket.sync = sync end