Skip to content

Commit

Permalink
chore: remove stream interface, use io.ReadWriter instead
Browse files Browse the repository at this point in the history
  • Loading branch information
EkkoG committed Sep 26, 2024
1 parent c4ed56e commit ae30d15
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions control/dns_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -876,12 +876,7 @@ func httpDNS(client *http.Client, target string, data []byte) (respMsg *dnsmessa
return respMsg, nil
}

type stream interface {
io.Reader
io.Writer
}

func streamDNS(stream stream, data []byte) (respMsg *dnsmessage.Msg, err error) {
func streamDNS(stream io.ReadWriter, data []byte) (respMsg *dnsmessage.Msg, err error) {
// We should write two byte length in the front of QUIC DNS request.
bReq := pool.Get(2 + len(data))
defer pool.Put(bReq)
Expand Down

0 comments on commit ae30d15

Please sign in to comment.