Class: HTTP::Timeout::Null

### Home Classes Methods

### In Files

- lib/http/timeout/null.rb

### Parent

Object

### Methods

- ::new
- #<<
- #connect
- #connect_ssl
- #readpartial
- #start_tls
- #write

### Class/Module Index

Quicksearch

- HTTP
- HTTP::Cache
- HTTP::Cache::Headers
- HTTP::Cache::NullCache
- HTTP::Cache::NullLogger
- HTTP::CacheError
- HTTP::Chainable
- HTTP::Client
- HTTP::Connection
- HTTP::Error
- HTTP::Headers
- HTTP::Headers::Mixin
- HTTP::InvalidHeaderNameError
- HTTP::MimeType
- HTTP::MimeType::Adapter
- HTTP::MimeType::JSON
- HTTP::Options
- HTTP::Redirector
- HTTP::Redirector::EndlessRedirectError
- HTTP::Redirector::TooManyRedirectsError
- HTTP::Request
- HTTP::Request::Caching
- HTTP::Request::UnsupportedMethodError
- HTTP::Request::UnsupportedSchemeError
- HTTP::Request::Writer
- HTTP::RequestError
- HTTP::Response
- HTTP::Response::Body
- HTTP::Response::Caching
- HTTP::Response::IoBody
- HTTP::Response::Parser
- HTTP::Response::Status
- HTTP::Response::StringBody
- HTTP::ResponseError
- HTTP::StateError
- HTTP::Timeout
- HTTP::Timeout::Global
- HTTP::Timeout::Null
- HTTP::Timeout::PerOperation
- HTTP::TimeoutError
- HTTP::URI
- Object

No matching classes.

# HTTP::Timeout::Null

### Attributes

options[R]
socket[R]

### Public Class Methods

new(options = {}) click to toggle source

    # File lib/http/timeout/null.rb, line 12
    def initialize(options = {})
      @options = options
    end

### Public Instance Methods

<<(data) click to toggle source
Alias for: write
connect(socket_class, host, port) click to toggle source

Connects to a socket

    # File lib/http/timeout/null.rb, line 17
    def connect(socket_class, host, port)
      @socket = socket_class.open(host, port)
    end

connect_ssl() click to toggle source

Starts a SSL connection on a socket

    # File lib/http/timeout/null.rb, line 22
    def connect_ssl
      @socket.connect
    end

readpartial(size) click to toggle source

Read from the socket

    # File lib/http/timeout/null.rb, line 40
    def readpartial(size)
      @socket.readpartial(size)
    end

start_tls(host, ssl_socket_class, ssl_context) click to toggle source

Configures the SSL connection and starts the connection

    # File lib/http/timeout/null.rb, line 27
    def start_tls(host, ssl_socket_class, ssl_context)
      @socket = ssl_socket_class.new(socket, ssl_context)
      @socket.hostname = host if @socket.respond_to? :hostname=
      @socket.sync_close = true if @socket.respond_to? :sync_close=

      connect_ssl

      return unless ssl_context.verify_mode == OpenSSL::SSL::VERIFY_PEER

      @socket.post_connection_check(host)
    end

write(data) click to toggle source

Write to the socket

    # File lib/http/timeout/null.rb, line 45
    def write(data)
      @socket << data
    end

Also aliased as: <<

[Validate]

Generated with the Darkfish Rdoc Generator 2.