scgi

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package scgi implements converters to handle SCGI requests using the standard library HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Request

func Request(r io.Reader) (*http.Request, error)

Request reads an SCGI request from an io.Reader, returning a http.Request. The returned Request's Body field is not populated.

Types

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

Conn converts an incoming SCGI-connection into a connection presenting a http.Request.

func NewConn

func NewConn(c net.Conn) (*Conn, error)

NewConn wraps a net.Conn, converting SCGI requests to http.Requests.

func (*Conn) Read

func (c *Conn) Read(b []byte) (n int, err error)

Read from the buffer containing the converted SCGI request.

type Listener

type Listener struct {
	net.Listener
}

Listener implements net.Listener, converting incoming SCGI requests into a connection which presents a http.Request if read.

func NewListener

func NewListener(l net.Listener) *Listener

NewListener wraps a net.Listener.

func (*Listener) Accept

func (l *Listener) Accept() (net.Conn, error)

Accept new connections and automatically wrap them.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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