module HTTPClient::SocketWrap
Wraps up a Socket for method interception.
Public Class Methods
Source
# File lib/httpclient/session.rb, line 308 def initialize(socket, *args) super(*args) @socket = socket end
Calls superclass method
Public Instance Methods
Source
# File lib/httpclient/session.rb, line 329 def read(size, buf = nil) @socket.read(size, buf) end
Source
# File lib/httpclient/session.rb, line 333 def readpartial(size, buf = nil) # StringIO doesn't support :readpartial if @socket.respond_to?(:readpartial) @socket.readpartial(size, buf) else @socket.read(size, buf) end end
Source
# File lib/httpclient/session.rb, line 354 def sync=(sync) @socket.sync = sync end