module HTTPClient::SocketWrap

Wraps up a Socket for method interception.

Public Class Methods

new(socket, *args) click to toggle source
# File lib/httpclient/session.rb, line 413
def initialize(socket, *args)
  super(*args)
  @socket = socket
end

Public Instance Methods

<<(str) click to toggle source
# File lib/httpclient/session.rb, line 447
def <<(str)
  @socket << str
end
close() click to toggle source
# File lib/httpclient/session.rb, line 418
def close
  @socket.close
end
closed?() click to toggle source
# File lib/httpclient/session.rb, line 422
def closed?
  @socket.closed?
end
eof?() click to toggle source
# File lib/httpclient/session.rb, line 426
def eof?
  @socket.eof?
end
flush() click to toggle source
# File lib/httpclient/session.rb, line 451
def flush
  @socket.flush
end
gets(*args) click to toggle source
# File lib/httpclient/session.rb, line 430
def gets(*args)
  @socket.gets(*args)
end
read(*args) click to toggle source
# File lib/httpclient/session.rb, line 434
def read(*args)
  @socket.read(*args)
end
readpartial(*args) click to toggle source
# File lib/httpclient/session.rb, line 438
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 455
def sync
  @socket.sync
end
sync=(sync) click to toggle source
# File lib/httpclient/session.rb, line 459
def sync=(sync)
  @socket.sync = sync
end