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

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

Issue 721273002: Remove timing limitation to set Broadcast, ReceiveBuffer, and SendBuffer options from UDPSocket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « media/cast/test/utility/udp_proxy.cc ('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_errors.h"
7 #include "net/base/net_log.h" 8 #include "net/base/net_log.h"
8 9
9 namespace net { 10 namespace net {
10 11
11 UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type, 12 UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type,
12 const RandIntCallback& rand_int_cb, 13 const RandIntCallback& rand_int_cb,
13 net::NetLog* net_log, 14 net::NetLog* net_log,
14 const net::NetLog::Source& source) 15 const net::NetLog::Source& source)
15 : socket_(bind_type, rand_int_cb, net_log, source) { 16 : socket_(bind_type, rand_int_cb, net_log, source) {
16 } 17 }
17 18
18 UDPClientSocket::~UDPClientSocket() { 19 UDPClientSocket::~UDPClientSocket() {
19 } 20 }
20 21
21 int UDPClientSocket::Connect(const IPEndPoint& address) { 22 int UDPClientSocket::Connect(const IPEndPoint& address) {
23 int rv = socket_.Open(address.GetFamily());
24 if (rv != OK)
25 return rv;
22 return socket_.Connect(address); 26 return socket_.Connect(address);
23 } 27 }
24 28
25 int UDPClientSocket::Read(IOBuffer* buf, 29 int UDPClientSocket::Read(IOBuffer* buf,
26 int buf_len, 30 int buf_len,
27 const CompletionCallback& callback) { 31 const CompletionCallback& callback) {
28 return socket_.Read(buf, buf_len, callback); 32 return socket_.Read(buf, buf_len, callback);
29 } 33 }
30 34
31 int UDPClientSocket::Write(IOBuffer* buf, 35 int UDPClientSocket::Write(IOBuffer* buf,
(...skipping 20 matching lines...) Expand all
52 56
53 int UDPClientSocket::SetSendBufferSize(int32 size) { 57 int UDPClientSocket::SetSendBufferSize(int32 size) {
54 return socket_.SetSendBufferSize(size); 58 return socket_.SetSendBufferSize(size);
55 } 59 }
56 60
57 const BoundNetLog& UDPClientSocket::NetLog() const { 61 const BoundNetLog& UDPClientSocket::NetLog() const {
58 return socket_.NetLog(); 62 return socket_.NetLog();
59 } 63 }
60 64
61 } // namespace net 65 } // namespace net
OLDNEW
« no previous file with comments | « media/cast/test/utility/udp_proxy.cc ('k') | net/udp/udp_server_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698