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

Unified Diff: net/socket/tcp_socket_win.cc

Issue 236203018: win: Implement Bluetooth server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for #3 Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« net/socket/tcp_socket_win.h ('K') | « net/socket/tcp_socket_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_socket_win.cc
diff --git a/net/socket/tcp_socket_win.cc b/net/socket/tcp_socket_win.cc
index 0d1192d359b30b7840162f13fff395e95e46ce7c..fc6d9d124871fcbb37e92c553016a17c2edcbf37 100644
--- a/net/socket/tcp_socket_win.cc
+++ b/net/socket/tcp_socket_win.cc
@@ -339,6 +339,21 @@ int TCPSocketWin::Bind(const IPEndPoint& address) {
return OK;
}
+int TCPSocketWin::AdoptBoundSocket(SOCKET socket) {
wtc 2014/04/24 23:09:31 I compared this method with AdoptConnectedSocket.
xiyuan 2014/04/25 20:29:29 |core_| is only used for read/write operations and
+ DCHECK(CalledOnValidThread());
+ DCHECK_EQ(socket_, INVALID_SOCKET);
+
+ socket_ = socket;
+
+ if (SetNonBlocking(socket_)) {
+ int result = MapSystemError(WSAGetLastError());
+ Close();
+ return result;
+ }
+
+ return OK;
+}
+
int TCPSocketWin::Listen(int backlog) {
DCHECK(CalledOnValidThread());
DCHECK_GT(backlog, 0);
« net/socket/tcp_socket_win.h ('K') | « net/socket/tcp_socket_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698