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