1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-01 03:25:23 +00:00
v2fly/transport/internet/sockopt_linux.go

13 lines
267 B
Go
Raw Normal View History

2018-09-06 08:06:57 +00:00
package internet
import "syscall"
func applySocketOptions(fd uintptr, config *SocketConfig) error {
if config.Mark != 0 {
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_MARK, config.Mark); err != nil {
return err
}
}
return nil
}