Skip to content
Snippets Groups Projects
Commit 5f53b588 authored by clohr's avatar clohr
Browse files

SO_REUSEPORT vs. SO_REUSEADDR...?

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/C/branches/version-0.7@2885 b32b6428-25c9-4566-ad07-03861ab6144f
parent 097761bc
No related branches found
No related tags found
No related merge requests found
...@@ -86,6 +86,7 @@ bool xAAL_join_bus(const char *addr, ...@@ -86,6 +86,7 @@ bool xAAL_join_bus(const char *addr,
if (bus->sfd == -1) if (bus->sfd == -1)
continue; continue;
if (is_multicast(rp)) { if (is_multicast(rp)) {
// Debate between the new (and non-standard) SO_REUSEPORT vs. the plain old SO_REUSEADDR ... still not clear...
if (setsockopt(bus->sfd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) == -1) { if (setsockopt(bus->sfd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) == -1) {
if (xAAL_error_log) fprintf(xAAL_error_log, "SO_REUSEPORT: %s\n", strerror(errno)); if (xAAL_error_log) fprintf(xAAL_error_log, "SO_REUSEPORT: %s\n", strerror(errno));
close(bus->sfd); close(bus->sfd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment