aslhttpserver

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TLSStateKey contextKey = "tlsState"

Variables

This section is empty.

Functions

This section is empty.

Types

type ASLConn

type ASLConn struct {
	TLSState *tls.ConnectionState
	// contains filtered or unexported fields
}

ASLConn wraps the TCPConn and ASLSession

func (ASLConn) Close

func (c ASLConn) Close() error

func (ASLConn) LocalAddr

func (c ASLConn) LocalAddr() net.Addr

func (ASLConn) Read

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

func (ASLConn) RemoteAddr

func (c ASLConn) RemoteAddr() net.Addr

func (ASLConn) SetDeadline

func (c ASLConn) SetDeadline(t time.Time) error

func (ASLConn) SetReadDeadline

func (c ASLConn) SetReadDeadline(t time.Time) error

func (ASLConn) SetWriteDeadline

func (c ASLConn) SetWriteDeadline(t time.Time) error

func (ASLConn) Write

func (c ASLConn) Write(b []byte) (n int, err error)

type ASLListener

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

ASLListener wraps a net.TCPListener and handles ASL sessions

func (ASLListener) Accept

func (l ASLListener) Accept() (net.Conn, error)

Accept accepts a new connection and wraps it with ASLSession

func (ASLListener) Addr

func (l ASLListener) Addr() net.Addr

Addr returns the listener's network address

func (ASLListener) Close

func (l ASLListener) Close() error

Close closes the listener

type ASLServer

type ASLServer struct {
	*http.Server
	ASLTLSEndpoint *asl.ASLEndpoint // Custom ASL Endpoint configuration
}

ASLServer struct that embeds http.Server and uses custom ASL TLS listener

func NewASLServer

func NewASLServer(addr string, handler http.Handler, endpointConfig *asl.EndpointConfig) *ASLServer

Constructor for ASLServer

func (*ASLServer) ListenAndServeASLTLS

func (srv *ASLServer) ListenAndServeASLTLS() error

Jump to

Keyboard shortcuts

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