Further improvements to httphi API (#173)

* add Exchange.WriteBodyString

* Mux.MaxPathValues and other improvements

* Mux PathValue improvemnt and fixes

* MuxSlice more method muxing improvements

* diagram out interesting approach to form parsing for clanker

* refactor RequestParseForm and achieve greatness in API design

* explicit naming of headerCapacityKV value in kvBuffer.Reset

* fix Mux bug not matching paths correctly; httpraw HTTP V1 naming applied

* rename many examples,use httphi in examples,remove useless maxAwaitingConn field

* add ipv4.String

* add ipv4 UnspecifiedAddr and BroadcastAddr

* add ethernet.String
This commit is contained in:
Pat Whittingslow
2026-07-31 12:47:33 -03:00
committed by GitHub
parent 5c54030f19
commit 1884cfc9b7
35 changed files with 2192 additions and 406 deletions
+9
View File
@@ -25,6 +25,15 @@ const (
MinimumMTU = MinimumFrameLength - sizeHeaderNoVLAN
)
// String returns the colon-separated hexadecimal text representation of a hardware address.
func String(hwAddr [6]byte) string {
// See net/netip's (Addr).string4 pattern.
var buf [maxAddrStringLen]byte
return string(AppendAddr(buf[:0], hwAddr))
}
const maxAddrStringLen = len("ff:ff:ff:ff:ff:ff")
// AppendAddr appends the text representation of the hardware address to the destination buffer.
func AppendAddr(dst []byte, hwAddr [6]byte) []byte {
for i, b := range hwAddr {