mirror of
https://github.com/soheilhy/cmux.git
synced 2024-11-09 19:21:52 +08:00
unexport prefixByteMatcher
This commit is contained in:
parent
4f90533583
commit
9a3402ad7a
@ -38,9 +38,7 @@ func PrefixMatcher(strs ...string) Matcher {
|
||||
return pt.matchPrefix
|
||||
}
|
||||
|
||||
// PrefixByteMatcher returns a matcher that matches a connection if it
|
||||
// starts with any of the []byte in list.
|
||||
func PrefixByteMatcher(list ...[]byte) Matcher {
|
||||
func prefixByteMatcher(list ...[]byte) Matcher {
|
||||
pt := newPatriciaTree(list...)
|
||||
return pt.matchPrefix
|
||||
}
|
||||
@ -83,7 +81,7 @@ func TLS(versions ...int) Matcher {
|
||||
for _, v := range versions {
|
||||
prefixes = append(prefixes, []byte{22, byte(v >> 8 & 0xff), byte(v & 0xff)})
|
||||
}
|
||||
return PrefixByteMatcher(prefixes...)
|
||||
return prefixByteMatcher(prefixes...)
|
||||
}
|
||||
|
||||
const maxHTTPRead = 4096
|
||||
|
Loading…
Reference in New Issue
Block a user