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

Issue 22861033: Move server socket functionality from TCPServerSocket into TCPSocket. (Closed)

Created:
7 years, 4 months ago by yzshen1
Modified:
7 years, 3 months ago
Reviewers:
wtc, akalin, Wez
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

Move server socket functionality from TCPServerSocket into TCPSocket. TCPServerSocket becomes a wrapper around TCPSocket to expose a server-only interface. There will be separate CLs to move client socket functionality from TCPClientSocket into TCPSocket. BUG=262601 TEST=newly added tcp_socket_unittest.cc Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220752

Patch Set 1 #

Total comments: 9

Patch Set 2 : #

Total comments: 13

Patch Set 3 : #

Patch Set 4 : #

Total comments: 13

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Total comments: 4

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+756 lines, -694 lines) Patch
M net/base/net_util.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M net/base/net_util.cc View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +9 lines, -6 lines 0 comments Download
M net/socket/tcp_server_socket.h View 1 2 1 chunk +39 lines, -12 lines 0 comments Download
A net/socket/tcp_server_socket.cc View 1 2 3 4 5 6 7 1 chunk +123 lines, -0 lines 0 comments Download
D net/socket/tcp_server_socket_libevent.h View 1 chunk +0 lines, -55 lines 0 comments Download
D net/socket/tcp_server_socket_libevent.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -219 lines 0 comments Download
D net/socket/tcp_server_socket_win.h View 1 chunk +0 lines, -58 lines 0 comments Download
D net/socket/tcp_server_socket_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -219 lines 0 comments Download
A net/socket/tcp_socket.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +32 lines, -0 lines 0 comments Download
A net/socket/tcp_socket_libevent.h View 1 2 3 4 5 6 7 8 9 1 chunk +72 lines, -0 lines 0 comments Download
A + net/socket/tcp_socket_libevent.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +92 lines, -60 lines 0 comments Download
A net/socket/tcp_socket_unittest.cc View 1 2 3 4 5 6 1 chunk +198 lines, -0 lines 0 comments Download
A net/socket/tcp_socket_win.h View 1 2 3 4 5 6 7 8 9 1 chunk +74 lines, -0 lines 0 comments Download
A + net/socket/tcp_socket_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +101 lines, -65 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
yzshen1
Hi, Fred and James. This is part of the net::TCP.*Socket refactoring that we discussed in ...
7 years, 4 months ago (2013-08-23 00:07:08 UTC) #1
yzshen1
On 2013/08/23 00:07:08, yzshen1 wrote: > Hi, Fred and James. > > This is part ...
7 years, 3 months ago (2013-08-26 16:59:13 UTC) #2
akalin
few initial comments https://codereview.chromium.org/22861033/diff/1/net/socket/tcp_client_socket_libevent.cc File net/socket/tcp_client_socket_libevent.cc (right): https://codereview.chromium.org/22861033/diff/1/net/socket/tcp_client_socket_libevent.cc#newcode166 net/socket/tcp_client_socket_libevent.cc:166: if (HANDLE_EINTR(close(socket)) < 0) may be ...
7 years, 3 months ago (2013-08-26 18:53:21 UTC) #3
yzshen1
Thanks Fred. Please take another look. https://codereview.chromium.org/22861033/diff/1/net/socket/tcp_client_socket_libevent.cc File net/socket/tcp_client_socket_libevent.cc (right): https://codereview.chromium.org/22861033/diff/1/net/socket/tcp_client_socket_libevent.cc#newcode166 net/socket/tcp_client_socket_libevent.cc:166: if (HANDLE_EINTR(close(socket)) < ...
7 years, 3 months ago (2013-08-26 23:09:57 UTC) #4
akalin
On 2013/08/26 23:09:57, yzshen1 wrote: > In this discussion thread > https://groups.google.com/a/chromium.org/forum/#%21topic/chromium-dev/UbAhFjxpDRk > > I ...
7 years, 3 months ago (2013-08-26 23:29:05 UTC) #5
akalin
https://codereview.chromium.org/22861033/diff/1/net/socket/tcp_client_socket_libevent.cc File net/socket/tcp_client_socket_libevent.cc (right): https://codereview.chromium.org/22861033/diff/1/net/socket/tcp_client_socket_libevent.cc#newcode166 net/socket/tcp_client_socket_libevent.cc:166: if (HANDLE_EINTR(close(socket)) < 0) On 2013/08/26 23:09:57, yzshen1 wrote: ...
7 years, 3 months ago (2013-08-26 23:29:14 UTC) #6
akalin
few more, just looking at TCPServerSocket https://codereview.chromium.org/22861033/diff/24001/net/socket/tcp_server_socket.cc File net/socket/tcp_server_socket.cc (right): https://codereview.chromium.org/22861033/diff/24001/net/socket/tcp_server_socket.cc#newcode30 net/socket/tcp_server_socket.cc:30: result = socket_.SetExclusiveAddrUse(); ...
7 years, 3 months ago (2013-08-26 23:48:51 UTC) #7
yzshen1
> Ah, I see. You also plan to move the client socket functionality into TCPSocket, ...
7 years, 3 months ago (2013-08-26 23:55:44 UTC) #8
yzshen1
Thanks, Fred! Please take another look. https://codereview.chromium.org/22861033/diff/24001/net/socket/tcp_server_socket.cc File net/socket/tcp_server_socket.cc (right): https://codereview.chromium.org/22861033/diff/24001/net/socket/tcp_server_socket.cc#newcode30 net/socket/tcp_server_socket.cc:30: result = socket_.SetExclusiveAddrUse(); ...
7 years, 3 months ago (2013-08-27 17:36:56 UTC) #9
yzshen1
https://codereview.chromium.org/22861033/diff/24001/net/socket/tcp_server_socket.cc File net/socket/tcp_server_socket.cc (right): https://codereview.chromium.org/22861033/diff/24001/net/socket/tcp_server_socket.cc#newcode30 net/socket/tcp_server_socket.cc:30: result = socket_.SetExclusiveAddrUse(); After a second thought, I just ...
7 years, 3 months ago (2013-08-27 22:54:25 UTC) #10
akalin
I have a few more nits, but I'm generally satisfied with this CL. However, I'm ...
7 years, 3 months ago (2013-08-29 22:08:32 UTC) #11
yzshen1
Thanks, Fred! https://codereview.chromium.org/22861033/diff/42001/net/socket/tcp_server_socket.cc File net/socket/tcp_server_socket.cc (right): https://codereview.chromium.org/22861033/diff/42001/net/socket/tcp_server_socket.cc#newcode58 net/socket/tcp_server_socket.cc:58: DCHECK(!pending_accept_); I thought this is more consistent ...
7 years, 3 months ago (2013-08-29 23:04:17 UTC) #12
akalin
https://codereview.chromium.org/22861033/diff/42001/net/socket/tcp_server_socket.cc File net/socket/tcp_server_socket.cc (right): https://codereview.chromium.org/22861033/diff/42001/net/socket/tcp_server_socket.cc#newcode58 net/socket/tcp_server_socket.cc:58: DCHECK(!pending_accept_); On 2013/08/29 23:04:18, yzshen1 wrote: > I thought ...
7 years, 3 months ago (2013-08-29 23:33:26 UTC) #13
yzshen1
Thanks Fred! > You know that NOTREACHED() is equivalent to DCHECK(false), not CHECK(false), > right? ...
7 years, 3 months ago (2013-08-29 23:50:14 UTC) #14
akalin
LGTM, but wait for wtc to look at it, too! https://codereview.chromium.org/22861033/diff/67001/net/base/net_util.h File net/base/net_util.h (right): https://codereview.chromium.org/22861033/diff/67001/net/base/net_util.h#newcode441 ...
7 years, 3 months ago (2013-08-29 23:54:36 UTC) #15
yzshen1
Great! Thanks Fred. :) https://codereview.chromium.org/22861033/diff/67001/net/base/net_util.h File net/base/net_util.h (right): https://codereview.chromium.org/22861033/diff/67001/net/base/net_util.h#newcode441 net/base/net_util.h:441: // Converts AddressFamily to socket ...
7 years, 3 months ago (2013-08-30 00:12:07 UTC) #16
wtc
Review comments on patch set 9: This seems OK. I only took a quick look. ...
7 years, 3 months ago (2013-08-30 18:45:48 UTC) #17
yzshen1
> This seems OK. I only took a quick look. Are you going to > ...
7 years, 3 months ago (2013-08-30 18:59:47 UTC) #18
Wez
Looking over this CL in the context of the surrounding net/socket/* code: - Do we ...
7 years, 3 months ago (2013-08-30 19:17:50 UTC) #19
akalin
On Fri, Aug 30, 2013 at 12:17 PM, <wez@chromium.org> wrote: > Looking over this CL ...
7 years, 3 months ago (2013-08-30 19:46:00 UTC) #20
yzshen1
> - Do we need the net::ServerSocket interface? It sounds generic but is in fact ...
7 years, 3 months ago (2013-08-30 21:11:22 UTC) #21
Wez
On 2013/08/30 21:11:22, yzshen1 wrote: > > - Do we need the net::ServerSocket interface? It ...
7 years, 3 months ago (2013-08-30 22:34:46 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yzshen@chromium.org/22861033/87001
7 years, 3 months ago (2013-09-01 08:19:27 UTC) #23
commit-bot: I haz the power
7 years, 3 months ago (2013-09-01 23:04:30 UTC) #24
Message was sent while issue was closed.
Change committed as 220752

Powered by Google App Engine
This is Rietveld 408576698