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

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

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/asyncinvoker.cc ('k') | webrtc/base/asyncsocket.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 10 matching lines...) Expand all
21 // This structure holds the info needed to update the packet send time header 21 // This structure holds the info needed to update the packet send time header
22 // extension, including the information needed to update the authentication tag 22 // extension, including the information needed to update the authentication tag
23 // after changing the value. 23 // after changing the value.
24 struct PacketTimeUpdateParams { 24 struct PacketTimeUpdateParams {
25 PacketTimeUpdateParams(); 25 PacketTimeUpdateParams();
26 ~PacketTimeUpdateParams(); 26 ~PacketTimeUpdateParams();
27 27
28 int rtp_sendtime_extension_id; // extension header id present in packet. 28 int rtp_sendtime_extension_id; // extension header id present in packet.
29 std::vector<char> srtp_auth_key; // Authentication key. 29 std::vector<char> srtp_auth_key; // Authentication key.
30 int srtp_auth_tag_len; // Authentication tag length. 30 int srtp_auth_tag_len; // Authentication tag length.
31 int64 srtp_packet_index; // Required for Rtp Packet authentication. 31 int64_t srtp_packet_index; // Required for Rtp Packet authentication.
32 }; 32 };
33 33
34 // This structure holds meta information for the packet which is about to send 34 // This structure holds meta information for the packet which is about to send
35 // over network. 35 // over network.
36 struct PacketOptions { 36 struct PacketOptions {
37 PacketOptions() : dscp(DSCP_NO_CHANGE) {} 37 PacketOptions() : dscp(DSCP_NO_CHANGE) {}
38 explicit PacketOptions(DiffServCodePoint dscp) : dscp(dscp) {} 38 explicit PacketOptions(DiffServCodePoint dscp) : dscp(dscp) {}
39 39
40 DiffServCodePoint dscp; 40 DiffServCodePoint dscp;
41 PacketTimeUpdateParams packet_time_params; 41 PacketTimeUpdateParams packet_time_params;
42 }; 42 };
43 43
44 // This structure will have the information about when packet is actually 44 // This structure will have the information about when packet is actually
45 // received by socket. 45 // received by socket.
46 struct PacketTime { 46 struct PacketTime {
47 PacketTime() : timestamp(-1), not_before(-1) {} 47 PacketTime() : timestamp(-1), not_before(-1) {}
48 PacketTime(int64 timestamp, int64 not_before) 48 PacketTime(int64_t timestamp, int64_t not_before)
49 : timestamp(timestamp), not_before(not_before) { 49 : timestamp(timestamp), not_before(not_before) {}
50 }
51 50
52 int64 timestamp; // Receive time after socket delivers the data. 51 int64_t timestamp; // Receive time after socket delivers the data.
53 int64 not_before; // Earliest possible time the data could have arrived, 52
54 // indicating the potential error in the |timestamp| value, 53 // Earliest possible time the data could have arrived, indicating the
55 // in case the system, is busy. For example, the time of 54 // potential error in the |timestamp| value, in case the system, is busy. For
56 // the last select() call. 55 // example, the time of the last select() call.
57 // If unknown, this value will be set to zero. 56 // If unknown, this value will be set to zero.
57 int64_t not_before;
58 }; 58 };
59 59
60 inline PacketTime CreatePacketTime(int64 not_before) { 60 inline PacketTime CreatePacketTime(int64_t not_before) {
61 return PacketTime(TimeMicros(), not_before); 61 return PacketTime(TimeMicros(), not_before);
62 } 62 }
63 63
64 // Provides the ability to receive packets asynchronously. Sends are not 64 // Provides the ability to receive packets asynchronously. Sends are not
65 // buffered since it is acceptable to drop packets under high load. 65 // buffered since it is acceptable to drop packets under high load.
66 class AsyncPacketSocket : public sigslot::has_slots<> { 66 class AsyncPacketSocket : public sigslot::has_slots<> {
67 public: 67 public:
68 enum State { 68 enum State {
69 STATE_CLOSED, 69 STATE_CLOSED,
70 STATE_BINDING, 70 STATE_BINDING,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Used only for listening TCP sockets. 129 // Used only for listening TCP sockets.
130 sigslot::signal2<AsyncPacketSocket*, AsyncPacketSocket*> SignalNewConnection; 130 sigslot::signal2<AsyncPacketSocket*, AsyncPacketSocket*> SignalNewConnection;
131 131
132 private: 132 private:
133 RTC_DISALLOW_COPY_AND_ASSIGN(AsyncPacketSocket); 133 RTC_DISALLOW_COPY_AND_ASSIGN(AsyncPacketSocket);
134 }; 134 };
135 135
136 } // namespace rtc 136 } // namespace rtc
137 137
138 #endif // WEBRTC_BASE_ASYNCPACKETSOCKET_H_ 138 #endif // WEBRTC_BASE_ASYNCPACKETSOCKET_H_
OLDNEW
« no previous file with comments | « webrtc/base/asyncinvoker.cc ('k') | webrtc/base/asyncsocket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698