Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Toggle main menu visibility
Loading...
Searching...
No Matches
udp.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Roc Streaming authors
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
*/
8
9
//! @file roc_packet/target_libuv/roc_packet/udp.h
10
//! @brief UDP packet.
11
12
#ifndef ROC_PACKET_UDP_H_
13
#define ROC_PACKET_UDP_H_
14
15
#include <uv.h>
16
17
#include "
roc_address/socket_addr.h
"
18
#include "
roc_core/slice.h
"
19
#include "
roc_core/stddefs.h
"
20
#include "
roc_core/time.h
"
21
22
namespace
roc
{
23
namespace
packet
{
24
25
//! UDP packet.
26
struct
UDP {
27
//! Source address.
28
//! @remarks
29
//! Address from which packet was / will be sent.
30
address::SocketAddr
src_addr
;
31
32
//! Destination address.
33
//! @remarks
34
//! Address to which packet was / will be sent.
35
address::SocketAddr
dst_addr
;
36
37
//! Packet receive timestamp (RTS), nanoseconds since Unix epoch.
38
//! @remarks
39
//! It points to a moment when packets was grabbed by network thread.
40
core::nanoseconds_t
receive_timestamp
;
41
42
//! Packet queue timestamp (QTS), nanoseconds since Unix epoch.
43
//! @remarks
44
//! It points to a moment when the packet was transferred to a sink-thread,
45
//! that "consumes" this packet. The reason to have it separate is that this
46
//! allows us to account additional jitter introduced by thread-switch time.
47
core::nanoseconds_t
queue_timestamp
;
48
49
//! Sender request state.
50
//! @remarks
51
//! Used by network thread.
52
uv_udp_send_t
request
;
53
54
UDP();
55
};
56
57
}
// namespace packet
58
}
// namespace roc
59
60
#endif
// ROC_PACKET_UDP_H_
roc::address::SocketAddr
Socket address.
Definition
socket_addr.h:26
roc::core::nanoseconds_t
int64_t nanoseconds_t
Nanoseconds.
Definition
time.h:58
roc::packet
Network packets and packet processing.
roc
Root namespace.
slice.h
Slice.
socket_addr.h
Socket address.
stddefs.h
Commonly used types and functions.
roc::packet::UDP::src_addr
address::SocketAddr src_addr
Source address.
Definition
udp.h:30
roc::packet::UDP::request
uv_udp_send_t request
Sender request state.
Definition
udp.h:52
roc::packet::UDP::queue_timestamp
core::nanoseconds_t queue_timestamp
Packet queue timestamp (QTS), nanoseconds since Unix epoch.
Definition
udp.h:47
roc::packet::UDP::receive_timestamp
core::nanoseconds_t receive_timestamp
Packet receive timestamp (RTS), nanoseconds since Unix epoch.
Definition
udp.h:40
roc::packet::UDP::dst_addr
address::SocketAddr dst_addr
Destination address.
Definition
udp.h:35
time.h
Time definitions.
roc_packet
target_libuv
roc_packet
udp.h
Generated by
1.17.0