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

Side by Side Diff: webrtc/base/asynctcpsocket.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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/asyncsocket.cc ('k') | webrtc/base/autodetectproxy.cc » ('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
11 #include "webrtc/base/asynctcpsocket.h" 11 #include "webrtc/base/asynctcpsocket.h"
12 12
13 #include <string.h> 13 #include <string.h>
14 14
15 #include "webrtc/base/byteorder.h" 15 #include "webrtc/base/byteorder.h"
16 #include "webrtc/base/common.h" 16 #include "webrtc/base/common.h"
17 #include "webrtc/base/logging.h" 17 #include "webrtc/base/logging.h"
18 18
19 #if defined(WEBRTC_POSIX) 19 #if defined(WEBRTC_POSIX)
20 #include <errno.h> 20 #include <errno.h>
21 #endif // WEBRTC_POSIX 21 #endif // WEBRTC_POSIX
22 22
23 namespace rtc { 23 namespace rtc {
24 24
25 static const size_t kMaxPacketSize = 64 * 1024; 25 static const size_t kMaxPacketSize = 64 * 1024;
26 26
27 typedef uint16 PacketLength; 27 typedef uint16_t PacketLength;
28 static const size_t kPacketLenSize = sizeof(PacketLength); 28 static const size_t kPacketLenSize = sizeof(PacketLength);
29 29
30 static const size_t kBufSize = kMaxPacketSize + kPacketLenSize; 30 static const size_t kBufSize = kMaxPacketSize + kPacketLenSize;
31 31
32 static const int kListenBacklog = 5; 32 static const int kListenBacklog = 5;
33 33
34 // Binds and connects |socket| 34 // Binds and connects |socket|
35 AsyncSocket* AsyncTCPSocketBase::ConnectSocket( 35 AsyncSocket* AsyncTCPSocketBase::ConnectSocket(
36 rtc::AsyncSocket* socket, 36 rtc::AsyncSocket* socket,
37 const rtc::SocketAddress& bind_address, 37 const rtc::SocketAddress& bind_address,
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 memmove(data, data + kPacketLenSize + pkt_len, *len); 291 memmove(data, data + kPacketLenSize + pkt_len, *len);
292 } 292 }
293 } 293 }
294 } 294 }
295 295
296 void AsyncTCPSocket::HandleIncomingConnection(AsyncSocket* socket) { 296 void AsyncTCPSocket::HandleIncomingConnection(AsyncSocket* socket) {
297 SignalNewConnection(this, new AsyncTCPSocket(socket, false)); 297 SignalNewConnection(this, new AsyncTCPSocket(socket, false));
298 } 298 }
299 299
300 } // namespace rtc 300 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/asyncsocket.cc ('k') | webrtc/base/autodetectproxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698