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

Add TCP Fast Open support #69

Merged
merged 5 commits into from
May 2, 2014
Merged

Add TCP Fast Open support #69

merged 5 commits into from
May 2, 2014

Conversation

clowwindy
Copy link

Available on Linux 3.7+. Useful for routers.

madeye added a commit that referenced this pull request May 2, 2014
Add TCP Fast Open support
@madeye madeye merged commit 554c981 into shadowsocks:master May 2, 2014
@madeye
Copy link

madeye commented May 2, 2014

Thanks! Merged.

if (fast_open)
{
opt = 5;
setsockopt(listen_sock, SOL_TCP, TCP_FASTOPEN, &opt, sizeof(opt));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在 OS X (10.9.2 (13C1021)) 下面编译的时候,会报错说 SOL_TCP 未定义
我在网上查了一下,似乎是把 SOL_TCP 改成 IPPROTO_TCP 就可以同时支持 OS X 和 Linux 了 (ref: http:https://patches.gluster.com/patch/3303/ ),不知如果这么改了的话对其它有没有影响。
另:OS X 应该是不支持 TCP fast open 的吧,或者改成直接在 OS X 下面 #undef TCP_FASTOPEN 如何?

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

Successfully merging this pull request may close these issues.

None yet

3 participants