fcgiclient

package
v0.0.0-...-2840294 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FCGI_BEGIN_REQUEST uint8 = iota + 1
	FCGI_ABORT_REQUEST
	FCGI_END_REQUEST
	FCGI_PARAMS
	FCGI_STDIN
	FCGI_STDOUT
	FCGI_STDERR
	FCGI_DATA
	FCGI_GET_VALUES
	FCGI_GET_VALUES_RESULT
	FCGI_UNKNOWN_TYPE
	FCGI_MAXTYPE = FCGI_UNKNOWN_TYPE
)
View Source
const (
	FCGI_RESPONDER uint8 = iota + 1
	FCGI_AUTHORIZER
	FCGI_FILTER
)
View Source
const (
	FCGI_REQUEST_COMPLETE uint8 = iota
	FCGI_CANT_MPX_CONN
	FCGI_OVERLOADED
	FCGI_UNKNOWN_ROLE
)
View Source
const (
	FCGI_MAX_CONNS  string = "MAX_CONNS"
	FCGI_MAX_REQS   string = "MAX_REQS"
	FCGI_MPXS_CONNS string = "MPXS_CONNS"
)
View Source
const FCGI_HEADER_LEN uint8 = 8
View Source
const FCGI_KEEP_CONN uint8 = 1
View Source
const FCGI_LISTENSOCK_FILENO uint8 = 0
View Source
const FCGI_NULL_REQUEST_ID uint8 = 0
View Source
const VERSION_1 uint8 = 1

Variables

View Source
var ConnectionBrokenError = errors.New("fcgi ConnectionBrokenError")

Functions

This section is empty.

Types

type FCGIClient

type FCGIClient struct {
	// contains filtered or unexported fields
}

func New

func New(h string, args interface{}) (fcgi *FCGIClient, err error)

Creates a new FCGI client.

If the second parameter is an int, the connection to net.Dial("tcp",h+":"+args) is established. If the second parameter is an string, the connection to net.Dial("unix",args) is established.

func (*FCGIClient) Broken

func (this *FCGIClient) Broken() bool

func (*FCGIClient) Close

func (this *FCGIClient) Close() error

func (*FCGIClient) Request

func (this *FCGIClient) Request(env map[string]string, reqStr string) (retout []byte, reterr []byte, err error)

func (*FCGIClient) RequestIO

func (this *FCGIClient) RequestIO(env map[string]string, reqStr string, rout, rerr io.Writer) (err error)

Does the same thing as .Request() but passes all data to rout and rerr Writers, wich is much more efficient.

The parameter 'rerr' can be nil, as this is checked.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL