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

Side by Side Diff: webrtc/base/socket.h

Issue 1944683002: Read recv timestamps from socket (posix only). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « webrtc/base/proxyserver.cc ('k') | webrtc/base/socket_unittest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 virtual SocketAddress GetLocalAddress() const = 0; 144 virtual SocketAddress GetLocalAddress() const = 0;
145 145
146 // Returns the address to which the socket is connected. If the socket is 146 // Returns the address to which the socket is connected. If the socket is
147 // not connected, then the any-address is returned. 147 // not connected, then the any-address is returned.
148 virtual SocketAddress GetRemoteAddress() const = 0; 148 virtual SocketAddress GetRemoteAddress() const = 0;
149 149
150 virtual int Bind(const SocketAddress& addr) = 0; 150 virtual int Bind(const SocketAddress& addr) = 0;
151 virtual int Connect(const SocketAddress& addr) = 0; 151 virtual int Connect(const SocketAddress& addr) = 0;
152 virtual int Send(const void *pv, size_t cb) = 0; 152 virtual int Send(const void *pv, size_t cb) = 0;
153 virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr) = 0; 153 virtual int SendTo(const void *pv, size_t cb, const SocketAddress& addr) = 0;
154 virtual int Recv(void *pv, size_t cb) = 0; 154 virtual int Recv(void* pv, size_t cb, int64_t* timestamp) = 0;
155 virtual int RecvFrom(void *pv, size_t cb, SocketAddress *paddr) = 0; 155 virtual int RecvFrom(void* pv,
156 size_t cb,
157 SocketAddress* paddr,
158 int64_t* timestamp) = 0;
156 virtual int Listen(int backlog) = 0; 159 virtual int Listen(int backlog) = 0;
157 virtual Socket *Accept(SocketAddress *paddr) = 0; 160 virtual Socket *Accept(SocketAddress *paddr) = 0;
158 virtual int Close() = 0; 161 virtual int Close() = 0;
159 virtual int GetError() const = 0; 162 virtual int GetError() const = 0;
160 virtual void SetError(int error) = 0; 163 virtual void SetError(int error) = 0;
161 inline bool IsBlocking() const { return IsBlockingError(GetError()); } 164 inline bool IsBlocking() const { return IsBlockingError(GetError()); }
162 165
163 enum ConnState { 166 enum ConnState {
164 CS_CLOSED, 167 CS_CLOSED,
165 CS_CONNECTING, 168 CS_CONNECTING,
(...skipping 23 matching lines...) Expand all
189 protected: 192 protected:
190 Socket() {} 193 Socket() {}
191 194
192 private: 195 private:
193 RTC_DISALLOW_COPY_AND_ASSIGN(Socket); 196 RTC_DISALLOW_COPY_AND_ASSIGN(Socket);
194 }; 197 };
195 198
196 } // namespace rtc 199 } // namespace rtc
197 200
198 #endif // WEBRTC_BASE_SOCKET_H__ 201 #endif // WEBRTC_BASE_SOCKET_H__
OLDNEW
« no previous file with comments | « webrtc/base/proxyserver.cc ('k') | webrtc/base/socket_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698