summaryrefslogtreecommitdiffstats
path: root/net/udp/udp_client_socket.cc
blob: 912394b23ef6cf8299dca2af0dc12f619ca57d8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/udp/udp_client_socket.h"

#include "net/base/net_log.h"

namespace net {

UDPClientSocket::UDPClientSocket(
    net::NetLog* net_log,
    const net::NetLog::Source& source)
    : socket_(net_log, source) {
}

UDPClientSocket::~UDPClientSocket() {
}

int UDPClientSocket::Connect(const IPEndPoint& address) {
  return socket_.Connect(address);
}

int UDPClientSocket::Read(IOBuffer* buf,
                          int buf_len,
                          CompletionCallback* callback) {
  return socket_.Read(buf, buf_len, callback);
}

int UDPClientSocket::Write(IOBuffer* buf,
                          int buf_len,
                          CompletionCallback* callback) {
  return socket_.Write(buf, buf_len, callback);
}

void UDPClientSocket::Close() {
  socket_.Close();
}

int UDPClientSocket::GetPeerAddress(IPEndPoint* address) const {
  return socket_.GetPeerAddress(address);
}

int UDPClientSocket::GetLocalAddress(IPEndPoint* address) const {
  return socket_.GetLocalAddress(address);
}

bool UDPClientSocket::SetReceiveBufferSize(int32 size) {
  return true;
}

bool UDPClientSocket::SetSendBufferSize(int32 size) {
  return true;
}

}  // namespace net