Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1279)

Issue 10739002: Added broadcasting feature to UDP server sockets. (Closed)

Created:
8 years, 5 months ago by ygorshenin1
Modified:
8 years, 3 months ago
Reviewers:
Sergey Ulanov, wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Dmitry Polukhin
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Added broadcasting feature to UDP server sockets. BUG=136797 TEST=net_unittests:UDPSocketTest.Broadcast Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=146790

Patch Set 1 #

Patch Set 2 : Fix. #

Patch Set 3 : Fix. #

Patch Set 4 : Added MacOS specific code. #

Total comments: 6

Patch Set 5 : Added AllowAddressReuse() method to UDPServerSocket" #

Patch Set 6 : Fixed Win code. #

Total comments: 16

Patch Set 7 : Added comments. #

Patch Set 8 : Fixed license headers. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -4 lines) Patch
M content/browser/renderer_host/p2p/socket_host_udp_unittest.cc View 1 2 3 4 5 6 7 3 chunks +10 lines, -1 line 0 comments Download
M net/udp/datagram_server_socket.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -1 line 0 comments Download
M net/udp/udp_server_socket.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M net/udp/udp_server_socket.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -1 line 0 comments Download
M net/udp/udp_socket_libevent.h View 1 2 3 4 5 6 2 chunks +22 lines, -0 lines 0 comments Download
M net/udp/udp_socket_libevent.cc View 1 2 3 4 4 chunks +41 lines, -0 lines 2 comments Download
M net/udp/udp_socket_unittest.cc View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download
M net/udp/udp_socket_win.h View 1 2 3 4 5 6 3 chunks +22 lines, -0 lines 0 comments Download
M net/udp/udp_socket_win.cc View 1 2 3 4 5 4 chunks +37 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
wtc
Unsolicited drive-by review comments on patch set 4: http://codereview.chromium.org/10739002/diff/21001/net/udp/udp_socket_libevent.cc File net/udp/udp_socket_libevent.cc (right): http://codereview.chromium.org/10739002/diff/21001/net/udp/udp_socket_libevent.cc#newcode449 net/udp/udp_socket_libevent.cc:449: reinterpret_cast<const ...
8 years, 5 months ago (2012-07-11 18:26:37 UTC) #1
ygorshenin1
PTAL http://codereview.chromium.org/10739002/diff/21001/net/udp/udp_socket_libevent.cc File net/udp/udp_socket_libevent.cc (right): http://codereview.chromium.org/10739002/diff/21001/net/udp/udp_socket_libevent.cc#newcode449 net/udp/udp_socket_libevent.cc:449: reinterpret_cast<const char*>(&true_value), On 2012/07/11 18:26:37, wtc wrote: > ...
8 years, 5 months ago (2012-07-12 09:28:08 UTC) #2
ygorshenin1
+ Sergey Sergey, could you please review content/* part?
8 years, 5 months ago (2012-07-12 14:05:13 UTC) #3
Sergey Ulanov
LGTM for content/browser/renderer_host/p2p, but please see my nits. http://codereview.chromium.org/10739002/diff/21003/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc File content/browser/renderer_host/p2p/socket_host_udp_unittest.cc (right): http://codereview.chromium.org/10739002/diff/21003/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc#newcode111 content/browser/renderer_host/p2p/socket_host_udp_unittest.cc:111: } ...
8 years, 5 months ago (2012-07-12 18:15:37 UTC) #4
wtc
Patch set 6 LGTM. http://codereview.chromium.org/10739002/diff/21003/net/udp/datagram_server_socket.h File net/udp/datagram_server_socket.h (right): http://codereview.chromium.org/10739002/diff/21003/net/udp/datagram_server_socket.h#newcode64 net/udp/datagram_server_socket.h:64: // be bound with other ...
8 years, 5 months ago (2012-07-12 23:49:47 UTC) #5
ygorshenin1
Many thanks! http://codereview.chromium.org/10739002/diff/21003/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc File content/browser/renderer_host/p2p/socket_host_udp_unittest.cc (right): http://codereview.chromium.org/10739002/diff/21003/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc#newcode111 content/browser/renderer_host/p2p/socket_host_udp_unittest.cc:111: } On 2012/07/12 18:15:37, sergeyu wrote: > ...
8 years, 5 months ago (2012-07-16 10:29:43 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ygorshenin@chromium.org/10739002/32001
8 years, 5 months ago (2012-07-16 10:32:09 UTC) #7
commit-bot: I haz the power
Change committed as 146790
8 years, 5 months ago (2012-07-16 11:52:37 UTC) #8
Sergey Ulanov
Sorry for belated comments, but I've just noticed that we set SO_REUSEPORT now and have ...
8 years, 3 months ago (2012-09-12 19:13:10 UTC) #9
ygorshenin1
8 years, 3 months ago (2012-09-13 18:29:16 UTC) #10
http://codereview.chromium.org/10739002/diff/32001/net/udp/udp_socket_libeven...
File net/udp/udp_socket_libevent.cc (right):

http://codereview.chromium.org/10739002/diff/32001/net/udp/udp_socket_libeven...
net/udp/udp_socket_libevent.cc:459: rv = setsockopt(socket_, SOL_SOCKET,
SO_REUSEPORT, &true_value,
Thanks, Sergey, you're right. SO_REUSEPORT is used together with a
broadcasting/multicasting. Please, take a look at
http://codereview.chromium.org/10917235/.

On 2012/09/12 19:13:10, sergeyu wrote:
> Why do we really need this option here? It seems like if we have it here then
> AllowAddressReuse() will behave differently on Mac and Windows. Also I'm not
> sure if implementation of SO_REUSEPORT is consistent between Linux and Mac -
> e.g. Mac's man page mentions how this option changes behavior for broadcast
> sockets, but Linux docs don't. If we need it on mac to receive broadcast
> messages properly, then maybe enable it only when broadcast is enabled?

Powered by Google App Engine
This is Rietveld 408576698