Class: Thrift::BaseTransport

### Home Classes Methods

### In Files

- lib/thrift/transport/base_transport.rb

### Parent

Object

### Methods

- #<<
- #close
- #flush
- #open
- #open?
- #read
- #read_all
- #read_byte
- #read_into_buffer
- #write

### Files

- CHANGELOG
- README
- Makefile

### Class/Module Index

Quicksearch

- Thrift
- Thrift::ApplicationException
- Thrift::BaseProtocol
- Thrift::BaseProtocolFactory
- Thrift::BaseServer
- Thrift::BaseServerTransport
- Thrift::BaseTransport
- Thrift::BaseTransportFactory
- Thrift::BinaryProtocol
- Thrift::BinaryProtocolAcceleratedFactory
- Thrift::BinaryProtocolFactory
- Thrift::BufferedTransport
- Thrift::BufferedTransportFactory
- Thrift::Client
- Thrift::CompactProtocol
- Thrift::CompactProtocol::CompactTypes
- Thrift::CompactProtocolFactory
- Thrift::Deserializer
- Thrift::Exception
- Thrift::FramedTransport
- Thrift::FramedTransportFactory
- Thrift::HTTPClientTransport
- Thrift::IOStreamTransport
- Thrift::MemoryBufferTransport
- Thrift::MessageTypes
- Thrift::MongrelHTTPServer
- Thrift::MongrelHTTPServer::Handler
- Thrift::NonblockingServer
- Thrift::Processor
- Thrift::ProtocolException
- Thrift::Serializer
- Thrift::ServerSocket
- Thrift::SimpleServer
- Thrift::Socket
- Thrift::Struct
- Thrift::Struct_Union
- Thrift::ThreadPoolServer
- Thrift::ThreadedServer
- Thrift::TransportException
- Thrift::TransportUtils
- Thrift::TypeError
- Thrift::Types
- Thrift::UNIXServerSocket
- Thrift::UNIXSocket
- Thrift::Union
- Fixnum

No matching classes.

# Thrift::BaseTransport

### Public Instance Methods

<<(buf) click to toggle source
Alias for: write
close() click to toggle source

    # File lib/thrift/transport/base_transport.rb, line 61
    def close; end

flush() click to toggle source

    # File lib/thrift/transport/base_transport.rb, line 98
    def flush; end

open() click to toggle source

    # File lib/thrift/transport/base_transport.rb, line 59
    def open; end

open?() click to toggle source

    # File lib/thrift/transport/base_transport.rb, line 57
    def open?; end

read(sz) click to toggle source

    # File lib/thrift/transport/base_transport.rb, line 63
    def read(sz)
      raise NotImplementedError
    end

read_all(size) click to toggle source

    # File lib/thrift/transport/base_transport.rb, line 84
    def read_all(size)
      return '' if size <= 0
      buf = read(size)
      while (buf.length < size)
        chunk = read(size - buf.length)
        buf << chunk
      end

      buf
    end

read_byte() click to toggle source

Returns an unsigned byte as a Fixnum in the range (0..255).

    # File lib/thrift/transport/base_transport.rb, line 68
    def read_byte
      buf = read_all(1)
      return ::Thrift::TransportUtils.get_string_byte(buf, 0)
    end

read_into_buffer(buffer, size) click to toggle source

Reads size bytes and copies them into buffer.

    # File lib/thrift/transport/base_transport.rb, line 74
    def read_into_buffer(buffer, size)
      tmp = read_all(size)
      i = 0
      tmp.each_byte do |byte|
        ::Thrift::TransportUtils.set_string_byte(buffer, i, byte)
        i += 1
      end
      i
    end

write(buf) click to toggle source

    # File lib/thrift/transport/base_transport.rb, line 95
    def write(buf); end

Also aliased as: <<

[Validate]

Generated with the Darkfish Rdoc Generator 2.