OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <winsock2.h> | 9 #include <winsock2.h> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/threading/non_thread_safe.h" | 13 #include "base/threading/non_thread_safe.h" |
14 #include "base/win/object_watcher.h" | 14 #include "base/win/object_watcher.h" |
15 #include "net/base/completion_callback.h" | 15 #include "net/base/completion_callback.h" |
| 16 #include "net/base/net_export.h" |
16 #include "net/base/rand_callback.h" | 17 #include "net/base/rand_callback.h" |
17 #include "net/base/ip_endpoint.h" | 18 #include "net/base/ip_endpoint.h" |
18 #include "net/base/io_buffer.h" | 19 #include "net/base/io_buffer.h" |
19 #include "net/base/net_log.h" | 20 #include "net/base/net_log.h" |
20 #include "net/udp/datagram_socket.h" | 21 #include "net/udp/datagram_socket.h" |
21 | 22 |
22 namespace net { | 23 namespace net { |
23 | 24 |
24 class UDPSocketWin : public base::NonThreadSafe { | 25 class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
25 public: | 26 public: |
26 UDPSocketWin(DatagramSocket::BindType bind_type, | 27 UDPSocketWin(DatagramSocket::BindType bind_type, |
27 const RandIntCallback& rand_int_cb, | 28 const RandIntCallback& rand_int_cb, |
28 net::NetLog* net_log, | 29 net::NetLog* net_log, |
29 const net::NetLog::Source& source); | 30 const net::NetLog::Source& source); |
30 virtual ~UDPSocketWin(); | 31 virtual ~UDPSocketWin(); |
31 | 32 |
32 // Connect the socket to connect with a certain |address|. | 33 // Connect the socket to connect with a certain |address|. |
33 // Returns a net error code. | 34 // Returns a net error code. |
34 int Connect(const IPEndPoint& address); | 35 int Connect(const IPEndPoint& address); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 CompletionCallback write_callback_; | 210 CompletionCallback write_callback_; |
210 | 211 |
211 BoundNetLog net_log_; | 212 BoundNetLog net_log_; |
212 | 213 |
213 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); | 214 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); |
214 }; | 215 }; |
215 | 216 |
216 } // namespace net | 217 } // namespace net |
217 | 218 |
218 #endif // NET_UDP_UDP_SOCKET_WIN_H_ | 219 #endif // NET_UDP_UDP_SOCKET_WIN_H_ |
OLD | NEW |