Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
socket_addr_to_str.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 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_address/socket_addr_to_str.h
10//! @brief Convert network address to string.
11
12#ifndef ROC_ADDRESS_SOCKET_ADDR_TO_STR_H_
13#define ROC_ADDRESS_SOCKET_ADDR_TO_STR_H_
14
17
18namespace roc {
19namespace address {
20
21//! Convert network address to string.
23public:
24 //! Construct.
26
27 //! Get formatted address.
28 const char* c_str() const {
29 return buffer_;
30 }
31
32private:
33 bool format_(const SocketAddr&);
34
35 char buffer_[SocketAddr::MaxStrLen];
36};
37
38} // namespace address
39} // namespace roc
40
41#endif // ROC_ADDRESS_SOCKET_ADDR_TO_STR_H_
Convert network address to string.
const char * c_str() const
Get formatted address.
socket_addr_to_str(const SocketAddr &)
Construct.
Base class for non-copyable objects.
Definition noncopyable.h:23
Root namespace.
Non-copyable object.
Socket address.