holy crap 2x

This commit is contained in:
JackDoan
2026-04-17 14:56:18 -05:00
parent f60cbfdc71
commit 1fd24a19c7
13 changed files with 928 additions and 13 deletions

View File

@@ -185,7 +185,7 @@ func NewUDPStatsEmitter(udpConns []Conn) func() {
return func() {}
}
func (u *StdConn) ListenOut(r EncReader) error {
func (u *StdConn) ListenOut(r EncReader, flush func()) error {
buffer := make([]byte, MTU)
for {
@@ -200,6 +200,7 @@ func (u *StdConn) ListenOut(r EncReader) error {
}
r(netip.AddrPortFrom(rua.Addr().Unmap(), rua.Port()), buffer[:n])
flush()
}
}