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

Side by Side Diff: net/udp/udp_client_socket.cc

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « net/udp/udp_client_socket.h ('k') | net/udp/udp_server_socket.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 #include "net/udp/udp_client_socket.h" 5 #include "net/udp/udp_client_socket.h"
6 6
7 #include "net/base/net_log.h" 7 #include "net/base/net_log.h"
8 8
9 namespace net { 9 namespace net {
10 10
11 UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type, 11 UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type,
12 const RandIntCallback& rand_int_cb, 12 const RandIntCallback& rand_int_cb,
13 net::NetLog* net_log, 13 net::NetLog* net_log,
14 const net::NetLog::Source& source) 14 const net::NetLog::Source& source)
15 : socket_(bind_type, rand_int_cb, net_log, source) { 15 : socket_(bind_type, rand_int_cb, net_log, source) {
16 } 16 }
17 17
18 UDPClientSocket::~UDPClientSocket() { 18 UDPClientSocket::~UDPClientSocket() {
19 } 19 }
20 20
21 int UDPClientSocket::Connect(const IPEndPoint& address) { 21 int UDPClientSocket::Connect(const IPEndPoint& address) {
22 return socket_.Connect(address); 22 return socket_.Connect(address);
23 } 23 }
24 24
25 int UDPClientSocket::Read(IOBuffer* buf, 25 int UDPClientSocket::Read(IOBuffer* buf,
26 int buf_len, 26 int buf_len,
27 OldCompletionCallback* callback) {
28 return socket_.Read(buf, buf_len, callback);
29 }
30 int UDPClientSocket::Read(IOBuffer* buf,
31 int buf_len,
32 const CompletionCallback& callback) { 27 const CompletionCallback& callback) {
33 return socket_.Read(buf, buf_len, callback); 28 return socket_.Read(buf, buf_len, callback);
34 } 29 }
35 30
36 int UDPClientSocket::Write(IOBuffer* buf, 31 int UDPClientSocket::Write(IOBuffer* buf,
37 int buf_len, 32 int buf_len,
38 OldCompletionCallback* callback) { 33 const CompletionCallback& callback) {
39 return socket_.Write(buf, buf_len, callback); 34 return socket_.Write(buf, buf_len, callback);
40 } 35 }
41 36
42 void UDPClientSocket::Close() { 37 void UDPClientSocket::Close() {
43 socket_.Close(); 38 socket_.Close();
44 } 39 }
45 40
46 int UDPClientSocket::GetPeerAddress(IPEndPoint* address) const { 41 int UDPClientSocket::GetPeerAddress(IPEndPoint* address) const {
47 return socket_.GetPeerAddress(address); 42 return socket_.GetPeerAddress(address);
48 } 43 }
49 44
50 int UDPClientSocket::GetLocalAddress(IPEndPoint* address) const { 45 int UDPClientSocket::GetLocalAddress(IPEndPoint* address) const {
51 return socket_.GetLocalAddress(address); 46 return socket_.GetLocalAddress(address);
52 } 47 }
53 48
54 bool UDPClientSocket::SetReceiveBufferSize(int32 size) { 49 bool UDPClientSocket::SetReceiveBufferSize(int32 size) {
55 return socket_.SetReceiveBufferSize(size); 50 return socket_.SetReceiveBufferSize(size);
56 } 51 }
57 52
58 bool UDPClientSocket::SetSendBufferSize(int32 size) { 53 bool UDPClientSocket::SetSendBufferSize(int32 size) {
59 return socket_.SetSendBufferSize(size); 54 return socket_.SetSendBufferSize(size);
60 } 55 }
61 56
62 const BoundNetLog& UDPClientSocket::NetLog() const { 57 const BoundNetLog& UDPClientSocket::NetLog() const {
63 return socket_.NetLog(); 58 return socket_.NetLog();
64 } 59 }
65 60
66 } // namespace net 61 } // namespace net
OLDNEW
« no previous file with comments | « net/udp/udp_client_socket.h ('k') | net/udp/udp_server_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698