Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
address_to_str.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 Roc 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_stdio/roc_packet/address_to_str.h
10
//! @brief Convert network address to string.
11
12
#ifndef ROC_PACKET_ADDRESS_TO_STR_H_
13
#define ROC_PACKET_ADDRESS_TO_STR_H_
14
15
#include "
roc_core/noncopyable.h
"
16
#include "
roc_packet/address.h
"
17
18
namespace
roc
{
19
namespace
packet {
20
21
//! Convert network address to string.
22
class
address_to_str
:
public
core::NonCopyable
<> {
23
public
:
24
//! Construct.
25
explicit
address_to_str
(
const
Address
&);
26
27
//! Get formatted address.
28
const
char
*
c_str
()
const
{
29
return
buffer_;
30
}
31
32
private
:
33
char
buffer_[256];
34
};
35
36
}
// namespace packet
37
}
// namespace roc
38
39
#endif
// ROC_PACKET_ADDRESS_TO_STR_H_
address.h
Network address.
roc::core::NonCopyable
Base class for non-copyable objects.
Definition:
noncopyable.h:23
roc::packet::Address
Network address.
Definition:
address.h:24
roc::packet::address_to_str
Convert network address to string.
Definition:
address_to_str.h:22
roc::packet::address_to_str::address_to_str
address_to_str(const Address &)
Construct.
roc::packet::address_to_str::c_str
const char * c_str() const
Get formatted address.
Definition:
address_to_str.h:28
roc
Root namespace.
noncopyable.h
Non-copyable object.
roc_packet
target_stdio
roc_packet
address_to_str.h
Generated by
1.9.1