Skip to content

Commit

Permalink
add decorate reader warning (#1596)
Browse files Browse the repository at this point in the history
The bytes read from the reader are returned to a pool and
must not be changed by the decorated reader.
  • Loading branch information
johanbrandhorst authored Aug 21, 2024
1 parent 07a2352 commit 6008929
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ type Server struct {
// If NotifyStartedFunc is set it is called once the server has started listening.
NotifyStartedFunc func()
// DecorateReader is optional, allows customization of the process that reads raw DNS messages.
// The decorated reader must not mutate the data read from the conn.
DecorateReader DecorateReader
// DecorateWriter is optional, allows customization of the process that writes raw DNS messages.
DecorateWriter DecorateWriter
Expand Down

0 comments on commit 6008929

Please sign in to comment.