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 425
def initialize(socket, *args)
  super(*args)
  @socket = socket
end

Public Instance Methods

<<(str) click to toggle source
# File lib/httpclient/session.rb, line 459
def <<(str)
  @socket << str
end
close() click to toggle source
# File lib/httpclient/session.rb, line 430
def close
  @socket.close
end
closed?() click to toggle source
# File lib/httpclient/session.rb, line 434
def closed?
  @socket.closed?
end
eof?() click to toggle source
# File lib/httpclient/session.rb, line 438
def eof?
  @socket.eof?
end
flush() click to toggle source
# File lib/httpclient/session.rb, line 463
def flush
  @socket.flush
end
gets(*args) click to toggle source
# File lib/httpclient/session.rb, line 442
def gets(*args)
  @socket.gets(*args)
end
read(*args) click to toggle source
# File lib/httpclient/session.rb, line 446
def read(*args)
  @socket.read(*args)
end
readpartial(*args) click to toggle source
# File lib/httpclient/session.rb, line 450
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 467
def sync
  @socket.sync
end
sync=(sync) click to toggle source
# File lib/httpclient/session.rb, line 471
def sync=(sync)
  @socket.sync = sync
end