jrthttp

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: EPL-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpExchange

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

HttpExchange is one request being answered; SendResponseHeaders(code, length) with length -1 means no body.

func (*HttpExchange) Close

func (e *HttpExchange) Close()

Close ends the exchange: the handler's return does that anyway. Closing before any header was sent drops the connection, as the JDK server does; a writer that cannot hijack gets an empty 200 instead.

func (*HttpExchange) GetRequestBody

func (e *HttpExchange) GetRequestBody() jrt.InputStream

func (*HttpExchange) GetRequestMethod

func (e *HttpExchange) GetRequestMethod() string

func (*HttpExchange) GetRequestURI

func (e *HttpExchange) GetRequestURI() *jrt.URI

func (*HttpExchange) GetResponseBody

func (e *HttpExchange) GetResponseBody() jrt.OutputStream

func (*HttpExchange) GetResponseHeaders

func (e *HttpExchange) GetResponseHeaders() *HttpHeaders

func (*HttpExchange) SendResponseHeaders

func (e *HttpExchange) SendResponseHeaders(code int32, length int64)

type HttpHeaders

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

func (*HttpHeaders) Set

func (h *HttpHeaders) Set(k, v string)

type HttpServer

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

HttpServer is com.sun.net.httpserver.HttpServer on a loopback listener.

func HttpServerCreate

func HttpServerCreate(addr *InetSocketAddress, _ int32) *HttpServer

func (*HttpServer) CreateContext

func (s *HttpServer) CreateContext(path string, h func(*HttpExchange))

func (*HttpServer) GetAddress

func (s *HttpServer) GetAddress() *InetSocketAddress

func (*HttpServer) Start

func (s *HttpServer) Start()

func (*HttpServer) Stop

func (s *HttpServer) Stop(delay int32)

type InetAddress

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

func InetAddressGetLoopbackAddress

func InetAddressGetLoopbackAddress() *InetAddress

type InetSocketAddress

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

func NewInetSocketAddress

func NewInetSocketAddress(addr *InetAddress, port int32) *InetSocketAddress

func (*InetSocketAddress) GetPort

func (a *InetSocketAddress) GetPort() int32

Jump to

Keyboard shortcuts

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