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

Side by Side Diff: net/socket/tcp_socket_win.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SOCKET_TCP_SOCKET_WIN_H_ 5 #ifndef NET_SOCKET_TCP_SOCKET_WIN_H_
6 #define NET_SOCKET_TCP_SOCKET_WIN_H_ 6 #define NET_SOCKET_TCP_SOCKET_WIN_H_
7 7
8 #include <winsock2.h> 8 #include <winsock2.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 public base::win::ObjectWatcher::Delegate { 28 public base::win::ObjectWatcher::Delegate {
29 public: 29 public:
30 TCPSocketWin(NetLog* net_log, const NetLog::Source& source); 30 TCPSocketWin(NetLog* net_log, const NetLog::Source& source);
31 virtual ~TCPSocketWin(); 31 virtual ~TCPSocketWin();
32 32
33 int Open(AddressFamily family); 33 int Open(AddressFamily family);
34 // Takes ownership of |socket|. 34 // Takes ownership of |socket|.
35 int AdoptConnectedSocket(SOCKET socket, const IPEndPoint& peer_address); 35 int AdoptConnectedSocket(SOCKET socket, const IPEndPoint& peer_address);
36 36
37 int Bind(const IPEndPoint& address); 37 int Bind(const IPEndPoint& address);
38 // Takes ownership of |socket|.
39 int AdoptBoundSocket(SOCKET socket);
wtc 2014/04/24 23:09:31 IMPORTANT: It would be better to list this method
xiyuan 2014/04/25 20:29:29 Renamed to AdoptListenSocket since the adopted |so
38 40
39 int Listen(int backlog); 41 int Listen(int backlog);
40 int Accept(scoped_ptr<TCPSocketWin>* socket, 42 int Accept(scoped_ptr<TCPSocketWin>* socket,
41 IPEndPoint* address, 43 IPEndPoint* address,
42 const CompletionCallback& callback); 44 const CompletionCallback& callback);
43 45
44 int Connect(const IPEndPoint& address, const CompletionCallback& callback); 46 int Connect(const IPEndPoint& address, const CompletionCallback& callback);
45 bool IsConnected() const; 47 bool IsConnected() const;
46 bool IsConnectedAndIdle() const; 48 bool IsConnectedAndIdle() const;
47 49
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 143
142 BoundNetLog net_log_; 144 BoundNetLog net_log_;
143 145
144 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); 146 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin);
145 }; 147 };
146 148
147 } // namespace net 149 } // namespace net
148 150
149 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ 151 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_
150 152
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698