• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_log.h"
8 
9 namespace net {
10 
UDPClientSocket(net::NetLog * net_log,const net::NetLog::Source & source)11 UDPClientSocket::UDPClientSocket(
12     net::NetLog* net_log,
13     const net::NetLog::Source& source)
14     : socket_(net_log, source) {
15 }
16 
~UDPClientSocket()17 UDPClientSocket::~UDPClientSocket() {
18 }
19 
Connect(const IPEndPoint & address)20 int UDPClientSocket::Connect(const IPEndPoint& address) {
21   return socket_.Connect(address);
22 }
23 
Read(IOBuffer * buf,int buf_len,CompletionCallback * callback)24 int UDPClientSocket::Read(IOBuffer* buf,
25                           int buf_len,
26                           CompletionCallback* callback) {
27   return socket_.Read(buf, buf_len, callback);
28 }
29 
Write(IOBuffer * buf,int buf_len,CompletionCallback * callback)30 int UDPClientSocket::Write(IOBuffer* buf,
31                           int buf_len,
32                           CompletionCallback* callback) {
33   return socket_.Write(buf, buf_len, callback);
34 }
35 
Close()36 void UDPClientSocket::Close() {
37   socket_.Close();
38 }
39 
GetPeerAddress(IPEndPoint * address) const40 int UDPClientSocket::GetPeerAddress(IPEndPoint* address) const {
41   return socket_.GetPeerAddress(address);
42 }
43 
GetLocalAddress(IPEndPoint * address) const44 int UDPClientSocket::GetLocalAddress(IPEndPoint* address) const {
45   return socket_.GetLocalAddress(address);
46 }
47 
SetReceiveBufferSize(int32 size)48 bool UDPClientSocket::SetReceiveBufferSize(int32 size) {
49   return true;
50 }
51 
SetSendBufferSize(int32 size)52 bool UDPClientSocket::SetSendBufferSize(int32 size) {
53   return true;
54 }
55 
56 }  // namespace net
57