go-proxy/server.go
Virgil a11d5b0969 refactor(proxy): align public comments with AX
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 00:42:12 +00:00

19 lines
426 B
Go

package proxy
import (
"crypto/tls"
"net"
)
// Server listens on one BindAddr and creates a Miner for each accepted connection.
//
// srv, result := proxy.NewServer(bind, tlsCfg, rateLimiter, onAccept)
// if result.OK { srv.Start() }
type Server struct {
addr BindAddr
tlsCfg *tls.Config // nil for plain TCP
limiter *RateLimiter
onAccept func(net.Conn, uint16)
listener net.Listener
done chan struct{}
}