ambienthttp

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

This package exists purely to override the net.Listener used by the application's http server. This is necessary for certain versions of firmware which errantly put an 0x0a (LF) following PASSKEY for AmbientWeather type http reporting.

This needs to be fixed upstream by Ambient Weather and is a complete hack that should never be necessary. Without this, the http server will silently crank back an HTTP:400

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAWNMutatingListener

func NewAWNMutatingListener(ctx context.Context, listen string) net.Listener

Types

type LFStrippingConn

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

func (*LFStrippingConn) Read

func (c *LFStrippingConn) Read(b []byte) (int, error)

type LFStrippingListener

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

Listener encapsulates LFStrippingConn to perform infuriating strip of newline character present after PASSKEY sent errantly by specific versions of firmware sending updates in AmbientWeather protocol

func (*LFStrippingListener) Accept

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

func (*LFStrippingListener) Addr

func (l *LFStrippingListener) Addr() net.Addr

func (*LFStrippingListener) Close

func (l *LFStrippingListener) Close() error

func (*LFStrippingListener) WrapConn

func (l *LFStrippingListener) WrapConn(conn net.Conn) net.Conn

Jump to

Keyboard shortcuts

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