Linux 上的 SO_REUSEPORT [英] SO_REUSEPORT on linux

查看:17
本文介绍了Linux 上的 SO_REUSEPORT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I want to know if SO_REUSEPORT option is enabled in LINUX 2.6 or not ??

If I try to use it and compile my code I get following error

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.)

Using the above option I guess I can bind two different sockets to same IPADRESS and PORT NUMBER

解决方案

this options was done in kernel 3.9, see this git commit

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c617f398edd4db2b8567a28e899a88f8f574798d

这篇关于Linux 上的 SO_REUSEPORT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆