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

Side by Side Diff: webrtc/libjingle/xmpp/xmppsocket.cc

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/libjingle/xmpp/xmppsocket.h ('k') | no next file » | 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 CreateCricketSocket(addr.family()); 172 CreateCricketSocket(addr.family());
173 } 173 }
174 if (cricket_socket_->Connect(addr) < 0) { 174 if (cricket_socket_->Connect(addr) < 0) {
175 return cricket_socket_->IsBlocking(); 175 return cricket_socket_->IsBlocking();
176 } 176 }
177 return true; 177 return true;
178 } 178 }
179 179
180 bool XmppSocket::Read(char * data, size_t len, size_t* len_read) { 180 bool XmppSocket::Read(char * data, size_t len, size_t* len_read) {
181 #ifndef USE_SSLSTREAM 181 #ifndef USE_SSLSTREAM
182 int read = cricket_socket_->Recv(data, len); 182 int read = cricket_socket_->Recv(data, len, nullptr);
183 if (read > 0) { 183 if (read > 0) {
184 *len_read = (size_t)read; 184 *len_read = (size_t)read;
185 return true; 185 return true;
186 } 186 }
187 #else // USE_SSLSTREAM 187 #else // USE_SSLSTREAM
188 rtc::StreamResult result = stream_->Read(data, len, len_read, NULL); 188 rtc::StreamResult result = stream_->Read(data, len, len_read, NULL);
189 if (result == rtc::SR_SUCCESS) 189 if (result == rtc::SR_SUCCESS)
190 return true; 190 return true;
191 #endif // USE_SSLSTREAM 191 #endif // USE_SSLSTREAM
192 return false; 192 return false;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 #endif // USE_SSLSTREAM 237 #endif // USE_SSLSTREAM
238 state_ = buzz::AsyncSocket::STATE_TLS_CONNECTING; 238 state_ = buzz::AsyncSocket::STATE_TLS_CONNECTING;
239 return true; 239 return true;
240 #else // !defined(FEATURE_ENABLE_SSL) 240 #else // !defined(FEATURE_ENABLE_SSL)
241 return false; 241 return false;
242 #endif // !defined(FEATURE_ENABLE_SSL) 242 #endif // !defined(FEATURE_ENABLE_SSL)
243 } 243 }
244 244
245 } // namespace buzz 245 } // namespace buzz
246 246
OLDNEW
« no previous file with comments | « webrtc/libjingle/xmpp/xmppsocket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698