Add note about different behavior when using WithSockOptions
This commit is contained in:
parent
f2d2e1cbc2
commit
1f086d5f8f
4
conn.go
4
conn.go
|
@ -116,7 +116,9 @@ func WithTestDial(f nltest.Func) ConnOption {
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithSockOptions sets the specified socket options when creating a new netlink
|
// WithSockOptions sets the specified socket options when creating a new netlink
|
||||||
// connection.
|
// connection. Note that when using WithSockOptions, you are responsible for
|
||||||
|
// providing a large-enough read and write buffer, whereas normally, the
|
||||||
|
// nftables package automatically enlarges the buffers as needed.
|
||||||
func WithSockOptions(opts ...SockOption) ConnOption {
|
func WithSockOptions(opts ...SockOption) ConnOption {
|
||||||
return func(cc *Conn) {
|
return func(cc *Conn) {
|
||||||
cc.sockOptions = append(cc.sockOptions, opts...)
|
cc.sockOptions = append(cc.sockOptions, opts...)
|
||||||
|
|
Loading…
Reference in New Issue