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

Improving socket performance #182

Closed
wjw465150 opened this issue Jul 20, 2011 · 7 comments
Closed

Improving socket performance #182

wjw465150 opened this issue Jul 20, 2011 · 7 comments
Milestone

Comments

@wjw465150
Copy link
Contributor

In the Connection.java file connection() method add:

            socket.setReuseAddress(true);
            socket.setKeepAlive(true);  
            socket.setTcpNoDelay(true); 
            socket.setSoLinger(true,0);  
@xetorthio
Copy link
Contributor

Hi! That's a great change! Could you measure how much it improves performance?

On 7/20/11, wjw465150
reply@reply.github.com
wrote:

In the Connection.java file connection() method add:

            socket.setReuseAddress(true);
            socket.setKeepAlive(true);
            socket.setTcpNoDelay(true);
            socket.setSoLinger(true,0);

Reply to this email directly or view it on GitHub:
#182

@wjw465150
Copy link
Contributor Author

Performance 4 times! and "Socket Address occupied error" does not occur.

@xetorthio
Copy link
Contributor

So this is really awesome!!!!!!!
Can you create a pull request? This way it is easier to merge and you
will keep credits for this :)

On 7/20/11, wjw465150
reply@reply.github.com
wrote:

Performance 4 times! and "Socket Address occupied error" does not occur.

Reply to this email directly or view it on GitHub:
#182 (comment)

@wjw465150
Copy link
Contributor Author

Thinks,I I have done

@ivowiblo
Copy link
Contributor

I'm closing it since it's already merged.

@eXcellme
Copy link

eXcellme commented Jul 7, 2017

I think it's not very graceful for sending RST message while every disconnect().
maybe socket.setSoLinger(true, timeout); better?

@marcosnils
Copy link
Contributor

@eXcellme probably. Do you have a use-case that is hitting this issue?

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

5 participants