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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 // Set the differentiated services flags on outgoing packets. May not | 162 // Set the differentiated services flags on outgoing packets. May not |
163 // do anything on some platforms. | 163 // do anything on some platforms. |
164 int SetDiffServCodePoint(DiffServCodePoint dscp); | 164 int SetDiffServCodePoint(DiffServCodePoint dscp); |
165 | 165 |
166 // Resets the thread to be used for thread-safety checks. | 166 // Resets the thread to be used for thread-safety checks. |
167 void DetachFromThread(); | 167 void DetachFromThread(); |
168 | 168 |
169 private: | 169 private: |
170 enum SocketOptions { | 170 enum SocketOptions { |
171 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, | 171 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, |
172 SOCKET_OPTION_BROADCAST = 1 << 1, | 172 SOCKET_OPTION_BROADCAST = 1 << 1, |
173 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2 | 173 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2 |
174 }; | 174 }; |
175 | 175 |
176 class Core; | 176 class Core; |
177 | 177 |
178 void DoReadCallback(int rv); | 178 void DoReadCallback(int rv); |
179 void DoWriteCallback(int rv); | 179 void DoWriteCallback(int rv); |
180 void DidCompleteRead(); | 180 void DidCompleteRead(); |
181 void DidCompleteWrite(); | 181 void DidCompleteWrite(); |
182 | 182 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 CompletionCallback write_callback_; | 256 CompletionCallback write_callback_; |
257 | 257 |
258 BoundNetLog net_log_; | 258 BoundNetLog net_log_; |
259 | 259 |
260 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); | 260 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); |
261 }; | 261 }; |
262 | 262 |
263 } // namespace net | 263 } // namespace net |
264 | 264 |
265 #endif // NET_UDP_UDP_SOCKET_WIN_H_ | 265 #endif // NET_UDP_UDP_SOCKET_WIN_H_ |
OLD | NEW |