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

so_reuseaddr #528

Closed
robutil opened this issue Aug 2, 2017 · 2 comments
Closed

so_reuseaddr #528

robutil opened this issue Aug 2, 2017 · 2 comments

Comments

@robutil
Copy link

robutil commented Aug 2, 2017

Hello,

I am using your library to create an ad-hoc WebSocketServer in Android, and it works very well.

However, in some cases I need to restart the WebSocketServer. Unfortunately, this is impossible because the flag of SO_REUSEADDR is not set, thus causing a BindException. Currently, this is fixed by simply restarting the application, but this is not desirable.

Could you allow the created socket in WebSocketServer.java in run() to be public, thus allowing users to set the socket.setReuseAddress(true) flag?

Thanks in advance

@marci4
Copy link
Collaborator

marci4 commented Aug 2, 2017

Hello @robutil,

I will add a setter which sets this flag internally. Like TCP_NODELAY.

Greetings
marci4

@marci4 marci4 self-assigned this Aug 2, 2017
marci4 added a commit to marci4/Java-WebSocket-Dev that referenced this issue Aug 2, 2017
TooTallNate#528
Cleaned up some debug printouts
@marci4 marci4 added this to the Release 1.3.5 milestone Aug 2, 2017
@marci4
Copy link
Collaborator

marci4 commented Aug 2, 2017

I added this feature just now.

Thx again for your input!
Greetings
marci4

@marci4 marci4 closed this as completed Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants