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

Public Instance Methods

<<(str) click to toggle source
# File lib/httpclient/session.rb, line 454
def <<(str)
  @socket << str
end
close() click to toggle source
# File lib/httpclient/session.rb, line 425
def close
  @socket.close
end
closed?() click to toggle source
# File lib/httpclient/session.rb, line 429
def closed?
  @socket.closed?
end
eof?() click to toggle source
# File lib/httpclient/session.rb, line 433
def eof?
  @socket.eof?
end
flush() click to toggle source
# File lib/httpclient/session.rb, line 458
def flush
  @socket.flush
end
gets(*args) click to toggle source
# File lib/httpclient/session.rb, line 437
def gets(*args)
  @socket.gets(*args)
end
read(*args) click to toggle source
# File lib/httpclient/session.rb, line 441
def read(*args)
  @socket.read(*args)
end
readpartial(*args) click to toggle source
# File lib/httpclient/session.rb, line 445
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 462
def sync
  @socket.sync
end
sync=(sync) click to toggle source
# File lib/httpclient/session.rb, line 466
def sync=(sync)
  @socket.sync = sync
end