proxy

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(wg *sync.WaitGroup)

Types

type ConnResponseWriter

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

ConnResponseWriter is our custom ResponseWriter that uses net.Conn.

func NewConnResponseWriter

func NewConnResponseWriter(conn net.Conn) *ConnResponseWriter

NewConnResponseWriter creates a new instance of ConnResponseWriter.

func (*ConnResponseWriter) Header

func (cw *ConnResponseWriter) Header() http.Header

Header returns the header map that will be sent by WriteHeader.

func (*ConnResponseWriter) Write

func (cw *ConnResponseWriter) Write(data []byte) (int, error)

Write sends data to the client connection as part of an HTTP response.

func (*ConnResponseWriter) WriteHeader

func (cw *ConnResponseWriter) WriteHeader(statusCode int)

WriteHeader writes the HTTP status code to the client.

Jump to

Keyboard shortcuts

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