We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 is needed to quickly reuse the same port after the application crash or forgets to close all connections properly.
SO_REUSEADDR
int opt = 1; setsockopt(server->handle, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
just before int rc = bind(server->handle, addrwithport->ai_addr, addrwithport->ai_addrlen); will do the job.
int rc = bind(server->handle, addrwithport->ai_addr, addrwithport->ai_addrlen);
Let me know if I shall create a PR for you.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
SO_REUSEADDR
is needed to quickly reuse the same port after the application crash or forgets to close all connections properly.just before
int rc = bind(server->handle, addrwithport->ai_addr, addrwithport->ai_addrlen);
will do the job.Let me know if I shall create a PR for you.
The text was updated successfully, but these errors were encountered: