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

Side by Side Diff: net/udp/datagram_socket.h

Issue 7042019: Net: Add NET_API to the UDP code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_UDP_DATAGRAM_SOCKET_H_ 5 #ifndef NET_UDP_DATAGRAM_SOCKET_H_
6 #define NET_UDP_DATAGRAM_SOCKET_H_ 6 #define NET_UDP_DATAGRAM_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 #include "net/base/net_api.h"
10
9 namespace net { 11 namespace net {
10 12
11 class IPEndPoint; 13 class IPEndPoint;
12 14
13 // A datagram socket is an interface to a protocol which exchanges 15 // A datagram socket is an interface to a protocol which exchanges
14 // datagrams, like UDP. 16 // datagrams, like UDP.
15 class DatagramSocket { 17 class NET_TEST DatagramSocket {
16 public: 18 public:
17 virtual ~DatagramSocket() {} 19 virtual ~DatagramSocket() {}
18 20
19 // Close the socket. 21 // Close the socket.
20 virtual void Close() = 0; 22 virtual void Close() = 0;
21 23
22 // Copy the remote udp address into |address| and return a network error code. 24 // Copy the remote udp address into |address| and return a network error code.
23 virtual int GetPeerAddress(IPEndPoint* address) const = 0; 25 virtual int GetPeerAddress(IPEndPoint* address) const = 0;
24 26
25 // Copy the local udp address into |address| and return a network error code. 27 // Copy the local udp address into |address| and return a network error code.
26 // (similar to getsockname) 28 // (similar to getsockname)
27 virtual int GetLocalAddress(IPEndPoint* address) const = 0; 29 virtual int GetLocalAddress(IPEndPoint* address) const = 0;
28 }; 30 };
29 31
30 } // namespace net 32 } // namespace net
31 33
32 #endif // NET_UDP_DATAGRAM_SOCKET_H_ 34 #endif // NET_UDP_DATAGRAM_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698