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

Side by Side Diff: net/udp/udp_socket_libevent.h

Issue 10134008: Add bind(), recvFrom(), sendTo() for UDP socket. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update Created 8 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
« no previous file with comments | « chrome/test/data/extensions/api_test/socket/api/background.js ('k') | net/udp/udp_socket_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_LIBEVENT_H_ 5 #ifndef NET_UDP_UDP_SOCKET_LIBEVENT_H_
6 #define NET_UDP_UDP_SOCKET_LIBEVENT_H_ 6 #define NET_UDP_UDP_SOCKET_LIBEVENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/threading/non_thread_safe.h" 12 #include "base/threading/non_thread_safe.h"
13 #include "net/base/address_list_net_log_param.h" 13 #include "net/base/address_list_net_log_param.h"
14 #include "net/base/completion_callback.h" 14 #include "net/base/completion_callback.h"
15 #include "net/base/net_export.h"
15 #include "net/base/rand_callback.h" 16 #include "net/base/rand_callback.h"
16 #include "net/base/io_buffer.h" 17 #include "net/base/io_buffer.h"
17 #include "net/base/ip_endpoint.h" 18 #include "net/base/ip_endpoint.h"
18 #include "net/base/net_log.h" 19 #include "net/base/net_log.h"
19 #include "net/udp/datagram_socket.h" 20 #include "net/udp/datagram_socket.h"
20 21
21 namespace net { 22 namespace net {
22 23
23 class UDPSocketLibevent : public base::NonThreadSafe { 24 class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
24 public: 25 public:
25 UDPSocketLibevent(DatagramSocket::BindType bind_type, 26 UDPSocketLibevent(DatagramSocket::BindType bind_type,
26 const RandIntCallback& rand_int_cb, 27 const RandIntCallback& rand_int_cb,
27 net::NetLog* net_log, 28 net::NetLog* net_log,
28 const net::NetLog::Source& source); 29 const net::NetLog::Source& source);
29 virtual ~UDPSocketLibevent(); 30 virtual ~UDPSocketLibevent();
30 31
31 // Connect the socket to connect with a certain |address|. 32 // Connect the socket to connect with a certain |address|.
32 // Returns a net error code. 33 // Returns a net error code.
33 int Connect(const IPEndPoint& address); 34 int Connect(const IPEndPoint& address);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 CompletionCallback write_callback_; 216 CompletionCallback write_callback_;
216 217
217 BoundNetLog net_log_; 218 BoundNetLog net_log_;
218 219
219 DISALLOW_COPY_AND_ASSIGN(UDPSocketLibevent); 220 DISALLOW_COPY_AND_ASSIGN(UDPSocketLibevent);
220 }; 221 };
221 222
222 } // namespace net 223 } // namespace net
223 224
224 #endif // NET_UDP_UDP_SOCKET_LIBEVENT_H_ 225 #endif // NET_UDP_UDP_SOCKET_LIBEVENT_H_
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/socket/api/background.js ('k') | net/udp/udp_socket_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698