WithClientHelloMessageHook sets the client hello message hook. Returns an error if the hook is nil.
(fn func(handshake.MessageClientHello) handshake.Message)
| 556 | // WithClientHelloMessageHook sets the client hello message hook. |
| 557 | // Returns an error if the hook is nil. |
| 558 | func WithClientHelloMessageHook(fn func(handshake.MessageClientHello) handshake.Message) Option { |
| 559 | return sharedOption(func(c *dtlsConfig) error { |
| 560 | if fn == nil { |
| 561 | return errNilClientHelloMessageHook |
| 562 | } |
| 563 | c.clientHelloMessageHook = fn |
| 564 | |
| 565 | return nil |
| 566 | }) |
| 567 | } |
| 568 | |
| 569 | // MinVersion sets the minimum TLS version that is acceptable. |
| 570 | // By default, DTLS 1.2 is currently used as the minimum as it's the only supported version. |
searching dependent graphs…