mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-23 20:49:13 -05:00
1fad9acf1a
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.17.1 to 2.17.2. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.17.1...v2.17.2) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
32 lines
897 B
Go
32 lines
897 B
Go
package wsutil
|
|
|
|
import "github.com/gobwas/ws"
|
|
|
|
// RecvExtension is an interface for clearing fragment header RSV bits.
|
|
type RecvExtension interface {
|
|
UnsetBits(ws.Header) (ws.Header, error)
|
|
}
|
|
|
|
// RecvExtensionFunc is an adapter to allow the use of ordinary functions as
|
|
// RecvExtension.
|
|
type RecvExtensionFunc func(ws.Header) (ws.Header, error)
|
|
|
|
// BitsRecv implements RecvExtension.
|
|
func (fn RecvExtensionFunc) UnsetBits(h ws.Header) (ws.Header, error) {
|
|
return fn(h)
|
|
}
|
|
|
|
// SendExtension is an interface for setting fragment header RSV bits.
|
|
type SendExtension interface {
|
|
SetBits(ws.Header) (ws.Header, error)
|
|
}
|
|
|
|
// SendExtensionFunc is an adapter to allow the use of ordinary functions as
|
|
// SendExtension.
|
|
type SendExtensionFunc func(ws.Header) (ws.Header, error)
|
|
|
|
// BitsSend implements SendExtension.
|
|
func (fn SendExtensionFunc) SetBits(h ws.Header) (ws.Header, error) {
|
|
return fn(h)
|
|
}
|