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 | |
167 private: | 164 private: |
168 enum SocketOptions { | 165 enum SocketOptions { |
169 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, | 166 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, |
170 SOCKET_OPTION_BROADCAST = 1 << 1, | 167 SOCKET_OPTION_BROADCAST = 1 << 1, |
171 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2 | 168 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2 |
172 }; | 169 }; |
173 | 170 |
174 class Core; | 171 class Core; |
175 | 172 |
176 void DoReadCallback(int rv); | 173 void DoReadCallback(int rv); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 CompletionCallback write_callback_; | 251 CompletionCallback write_callback_; |
255 | 252 |
256 BoundNetLog net_log_; | 253 BoundNetLog net_log_; |
257 | 254 |
258 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); | 255 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); |
259 }; | 256 }; |
260 | 257 |
261 } // namespace net | 258 } // namespace net |
262 | 259 |
263 #endif // NET_UDP_UDP_SOCKET_WIN_H_ | 260 #endif // NET_UDP_UDP_SOCKET_WIN_H_ |
OLD | NEW |