Skip to content

Bug #49341: Add SO_REUSEPORT support for socket_set_option() #183

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

Merged
merged 1 commit into from
Dec 2, 2012

Conversation

igorw
Copy link
Contributor

@igorw igorw commented Sep 2, 2012

Ticket: https://bugs.php.net/49341

This is a BSD-only feature, and it will only be available on BSD. On other platforms the constant will simply not be set.

Note: This is my first time submitting a patch to PHP, so let me know if I did something wrong or missed something.

@travisbot
Copy link

This pull request fails (merged 6a1cedf8 into a26390e).

@lstrojny
Copy link
Contributor

Thanks for the patch. Could you shortly explain what this patch does functionality wise (this is important for the documentation team) and add a PHPT test (for the platform that support it).

This is a BSD-only feature, and it will only be available on BSD.
On other platforms the constant will simply not be set.
@igorw
Copy link
Contributor Author

igorw commented Dec 2, 2012

This patch introduces the platform-specific SO_REUSEPORT constant, which is only available on *BSD (including OSX). This constant is a socket option that enables binding to a port that an other process has already bound to. That is possible if the other process also enabled this option when binding.

A specific use case for this is listening for multicast messages. Even if a system-wide daemon is running and listening on a multicast port, this allows other programs to also listen on the same port.

I have rebased my patch and added a test case.

@php-pulls php-pulls merged commit ec2a132 into php:PHP-5.4 Dec 2, 2012
@lstrojny
Copy link
Contributor

lstrojny commented Dec 2, 2012

Merged into 5.4, 5.5 and master.

@lstrojny
Copy link
Contributor

lstrojny commented Dec 2, 2012

Thanks!

php-pulls pushed a commit that referenced this pull request May 26, 2014
php-pulls pushed a commit that referenced this pull request May 26, 2014
* PHP-5.5:
  Fixed issue #183 (TMP_VAR is not only used once)
php-pulls pushed a commit that referenced this pull request May 26, 2014
* PHP-5.6:
  Fixed issue #183 (TMP_VAR is not only used once)
php-pulls pushed a commit that referenced this pull request May 26, 2014
…_56_backport

* origin/PHP-5.6:
  Fixed issue #183 (TMP_VAR is not only used once)
  Fix broken Junit output with --disable-cgi
  Added folder mark
php-pulls pushed a commit that referenced this pull request May 26, 2014
…into str_size_and_int64

* origin/str_size_and_int64_56_backport: (29 commits)
  Fixed issue #183 (TMP_VAR is not only used once)
  Fix broken Junit output with --disable-cgi
  Added folder mark
  Further test fixes for the fdb2709 breakage.
  Fix broken test caused by fdb2709.
  Fix run-tests.php with Valgrind >= 3.10.0.
  Add microseconds to the serialised form of DateTime objects.
  Improved test for bug #62479
  fix typo in ODBC code
  Support for __debugInfo (Joe Watkins)
  Optimize ZEND_POW (Rouven Weßling)
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
  Prevent recursion in ZF2 Parameters class
  5.5.14 now
  adding NEWS block for beta4
  5.4.30 next
  enable email notifications
  update NEWS
  update NEWS
  ...

Conflicts:
	ext/opcache/ZendAccelerator.h
	ext/spl/spl_array.c
php-pulls pushed a commit that referenced this pull request May 26, 2014
* master:
  Fixed issue #183 (TMP_VAR is not only used once)
  Fix broken Junit output with --disable-cgi
  Added folder mark
  Further test fixes for the fdb2709 breakage.
  Fix broken test caused by fdb2709.
  Added tests for ZipArchive::addGlob() and ZipArchive::addPattern()
  Fix run-tests.php with Valgrind >= 3.10.0.
  Add microseconds to the serialised form of DateTime objects.
  Improved test for bug #62479
  fix typo in ODBC code
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
  5.5.14 now
  Fix bug #67060: use default mode of 660

Conflicts:
	ext/date/php_date.c
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.

4 participants