MCPcopy Create free account
hub / github.com/pion/dtls / WithHelloRandomBytesGenerator

Function WithHelloRandomBytesGenerator

options.go:545–554  ·  view source on GitHub ↗

WithHelloRandomBytesGenerator sets the hello random bytes generator. Returns an error if the generator is nil.

(fn func() [handshake.RandomBytesLength]byte)

Source from the content-addressed store, hash-verified

543// WithHelloRandomBytesGenerator sets the hello random bytes generator.
544// Returns an error if the generator is nil.
545func WithHelloRandomBytesGenerator(fn func() [handshake.RandomBytesLength]byte) Option {
546 return sharedOption(func(c *dtlsConfig) error {
547 if fn == nil {
548 return errNilHelloRandomBytesGenerator
549 }
550 c.helloRandomBytesGenerator = fn
551
552 return nil
553 })
554}
555
556// WithClientHelloMessageHook sets the client hello message hook.
557// Returns an error if the hook is nil.

Callers 1

Calls 1

sharedOptionFuncType · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…