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

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

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/udp/udp_client_socket.h ('k') | net/udp/udp_net_log_parameters.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "net/udp/udp_client_socket.h"
6
7 #include "net/base/net_errors.h"
8 #include "net/base/net_log.h"
9
10 namespace net {
11
12 UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type,
13 const RandIntCallback& rand_int_cb,
14 net::NetLog* net_log,
15 const net::NetLog::Source& source)
16 : socket_(bind_type, rand_int_cb, net_log, source) {
17 }
18
19 UDPClientSocket::~UDPClientSocket() {
20 }
21
22 int UDPClientSocket::Connect(const IPEndPoint& address) {
23 int rv = socket_.Open(address.GetFamily());
24 if (rv != OK)
25 return rv;
26 return socket_.Connect(address);
27 }
28
29 int UDPClientSocket::Read(IOBuffer* buf,
30 int buf_len,
31 const CompletionCallback& callback) {
32 return socket_.Read(buf, buf_len, callback);
33 }
34
35 int UDPClientSocket::Write(IOBuffer* buf,
36 int buf_len,
37 const CompletionCallback& callback) {
38 return socket_.Write(buf, buf_len, callback);
39 }
40
41 void UDPClientSocket::Close() {
42 socket_.Close();
43 }
44
45 int UDPClientSocket::GetPeerAddress(IPEndPoint* address) const {
46 return socket_.GetPeerAddress(address);
47 }
48
49 int UDPClientSocket::GetLocalAddress(IPEndPoint* address) const {
50 return socket_.GetLocalAddress(address);
51 }
52
53 int UDPClientSocket::SetReceiveBufferSize(int32 size) {
54 return socket_.SetReceiveBufferSize(size);
55 }
56
57 int UDPClientSocket::SetSendBufferSize(int32 size) {
58 return socket_.SetSendBufferSize(size);
59 }
60
61 const BoundNetLog& UDPClientSocket::NetLog() const {
62 return socket_.NetLog();
63 }
64
65 #if defined(OS_WIN)
66 void UDPClientSocket::UseNonBlockingIO() {
67 socket_.UseNonBlockingIO();
68 }
69 #endif
70
71 } // namespace net
OLDNEW
« no previous file with comments | « net/udp/udp_client_socket.h ('k') | net/udp/udp_net_log_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698