OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UDP_UDP_SOCKET_WIN_H_ | 5 #ifndef NET_UDP_UDP_SOCKET_WIN_H_ |
6 #define NET_UDP_UDP_SOCKET_WIN_H_ | 6 #define NET_UDP_UDP_SOCKET_WIN_H_ |
7 | 7 |
8 #include <winsock2.h> | 8 #include <winsock2.h> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // multicast loopback mode. On Windows, the applications with loopback off | 154 // multicast loopback mode. On Windows, the applications with loopback off |
155 // will not RECEIVE the loopback packets; while on Unix-like systems, the | 155 // will not RECEIVE the loopback packets; while on Unix-like systems, the |
156 // applications with loopback off will not SEND the loopback packets to | 156 // applications with loopback off will not SEND the loopback packets to |
157 // other applications on the same host. See MSDN: http://goo.gl/6vqbj | 157 // other applications on the same host. See MSDN: http://goo.gl/6vqbj |
158 int SetMulticastLoopbackMode(bool loopback); | 158 int SetMulticastLoopbackMode(bool loopback); |
159 | 159 |
160 // Set the differentiated services flags on outgoing packets. May not | 160 // Set the differentiated services flags on outgoing packets. May not |
161 // do anything on some platforms. | 161 // do anything on some platforms. |
162 int SetDiffServCodePoint(DiffServCodePoint dscp); | 162 int SetDiffServCodePoint(DiffServCodePoint dscp); |
163 | 163 |
| 164 // Resets the thread to be used for thread-safety checks. |
| 165 void DetachFromThread(); |
| 166 |
164 private: | 167 private: |
165 enum SocketOptions { | 168 enum SocketOptions { |
166 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, | 169 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, |
167 SOCKET_OPTION_BROADCAST = 1 << 1, | 170 SOCKET_OPTION_BROADCAST = 1 << 1, |
168 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2 | 171 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2 |
169 }; | 172 }; |
170 | 173 |
171 class Core; | 174 class Core; |
172 | 175 |
173 void DoReadCallback(int rv); | 176 void DoReadCallback(int rv); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 CompletionCallback write_callback_; | 254 CompletionCallback write_callback_; |
252 | 255 |
253 BoundNetLog net_log_; | 256 BoundNetLog net_log_; |
254 | 257 |
255 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); | 258 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); |
256 }; | 259 }; |
257 | 260 |
258 } // namespace net | 261 } // namespace net |
259 | 262 |
260 #endif // NET_UDP_UDP_SOCKET_WIN_H_ | 263 #endif // NET_UDP_UDP_SOCKET_WIN_H_ |
OLD | NEW |