Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bind failure in epoll mode #57

Open
dwing4g opened this issue Jun 16, 2020 · 3 comments
Open

bind failure in epoll mode #57

dwing4g opened this issue Jun 16, 2020 · 3 comments

Comments

@dwing4g
Copy link

dwing4g commented Jun 16, 2020

always throw IOException: Address family not supported by protocol
in Native.cpp:
int listenfd = socket(AF_INET6,SOCK_STREAM,0);

现在仍然有很多服务器并没安装IPv6协议栈, 建议增加IPv4的支持.

@wangkaish
Copy link
Member

抱歉回复有些晚,监听IPv6协议栈可以同时接收IPv4和IPv6的连接,仅支持IPv4的服务器太小众了,可以使用原生nio.

@dwing4g
Copy link
Author

dwing4g commented Jun 19, 2020

抱歉回复有些晚,监听IPv6协议栈可以同时接收IPv4和IPv6的连接,仅支持IPv4的服务器太小众了,可以使用原生nio.

只是多写两行代码, 失败就用AF_INET宏再试一次的事

@wangkaish
Copy link
Member

抱歉回复有些晚,监听IPv6协议栈可以同时接收IPv4和IPv6的连接,仅支持IPv4的服务器太小众了,可以使用原生nio.

只是多写两行代码, 失败就用AF_INET宏再试一次的事

那我找个时间加一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants