我想知道 LINUX 2.6 中是否启用了 SO_REUSEPORT 选项?
如果我尝试使用它并编译我的代码,我会收到以下错误
01.c:72: error: `SO_REUSEPORT' undeclared (first use in this function)
01.c:72: error: (Each undeclared identifier is reported only once
01.c:72: error: for each function it appears in.)
使用上面的选项我想我可以将两个不同的套接字绑定到相同的IP地址和端口号
此选项是在内核 3.9 中完成的,请参阅此 git commit
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c617f398edd4db2b8567a28e899a88f8f574798d http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c617f398edd4db2b8567a28e899a88f8f574798d
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)