refactor: minor issue and documentation

This commit is contained in:
yusing
2026-02-07 21:01:04 +08:00
parent 58305a496f
commit 65cfa90c95
4 changed files with 9 additions and 11 deletions

View File

@@ -63,10 +63,9 @@ func NewUDPUDPStream(network, listenAddr, dstAddr string) (nettypes.Stream, erro
```go
type Stream interface {
ListenAndServe(ctx context.Context, preDial, onRead HookFunc)
ListenAndServe(ctx context.Context, preDial, onRead HookFunc) error
Close() error
LocalAddr() net.Addr
zerolog.LogObjectMarshaler
}
type HookFunc func(ctx context.Context) error