summaryrefslogtreecommitdiffstats
path: root/net/udp/udp_client_socket.cc
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 22:56:18 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 22:56:18 +0000
commita2798d9808595a3b9d3a3b5fe6a3d0109a13aabd (patch)
tree50b849bc622aa4825f4eff165a655778678ccf84 /net/udp/udp_client_socket.cc
parent4b9baf9d5a55852ab9613a04d745e891a6d083f0 (diff)
downloadchromium_src-a2798d9808595a3b9d3a3b5fe6a3d0109a13aabd.zip
chromium_src-a2798d9808595a3b9d3a3b5fe6a3d0109a13aabd.tar.gz
chromium_src-a2798d9808595a3b9d3a3b5fe6a3d0109a13aabd.tar.bz2
Add an initial API and implementation for UDP Sockets.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6597039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/udp/udp_client_socket.cc')
-rw-r--r--net/udp/udp_client_socket.cc49
1 files changed, 49 insertions, 0 deletions
diff --git a/net/udp/udp_client_socket.cc b/net/udp/udp_client_socket.cc
new file mode 100644
index 0000000..5cc498d
--- /dev/null
+++ b/net/udp/udp_client_socket.cc
@@ -0,0 +1,49 @@
+// 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 AddressList& 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(AddressList* address) const {
+ return socket_.GetPeerAddress(address);
+}
+
+int UDPClientSocket::GetLocalAddress(AddressList* address) const {
+ return socket_.GetLocalAddress(address);
+}
+
+
+} // namespace net