Class: FCGI::FastCGISocket

### Home Classes Methods

### In Files

- lib/fcgi.rb

### Parent

Object

### Methods

- ::new
- #read_record
- #send_record

### Class/Module Index

Quicksearch

- FCGI
- FCGI::AbortRequestRecord
- FCGI::BeginRequestRecord
- FCGI::DataRecord
- FCGI::EndRequestRecord
- FCGI::FastCGISocket
- FCGI::GenericDataRecord
- FCGI::GetValuesRecord
- FCGI::ParamsRecord
- FCGI::Record
- FCGI::RecordBuffer
- FCGI::Request
- FCGI::Server
- FCGI::StdinDataRecord
- FCGI::StdoutDataRecord
- FCGI::UnknownTypeRecord
- FCGI::ValuesRecord

No matching classes.

# FCGI::FastCGISocket

### Public Class Methods

new(sock) click to toggle source

    # File lib/fcgi.rb, line 187
    def initialize(sock)
      @socket = sock
    end

### Public Instance Methods

read_record() click to toggle source

    # File lib/fcgi.rb, line 191
    def read_record
      header = @socket.read(Record::HEADER_LENGTH) or return nil
      return nil unless header.size == Record::HEADER_LENGTH
      version, type, reqid, clen, padlen, reserved = *Record.parse_header(header)
      Record.class_for(type).parse(reqid, read_record_body(clen, padlen))
    end

send_record(rec) click to toggle source

    # File lib/fcgi.rb, line 208
    def send_record(rec)
      @socket.write rec.serialize
      @socket.flush
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.