]> git.llucax.com Git - software/posixx.git/blob - src/socket/inet/print.hpp
Add Boost License
[software/posixx.git] / src / socket / inet / print.hpp
1 // Copyright Leandro Lucarella 2008 - 2010.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file COPYING or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5
6
7 #ifndef POSIXX_SOCKET_INET_PRINT_HPP_
8 #define POSIXX_SOCKET_INET_PRINT_HPP_
9
10 #include "../inet.hpp" // posixx::socket::inet::sockaddr
11 #include <ostream> // std::ostream
12
13 inline
14 std::ostream& operator << (std::ostream& os,
15                 const posixx::socket::inet::sockaddr& sa) throw()
16 {
17         return os << "inet::sockaddr(addr=" << sa.addr()
18                         << ", port=" << sa.port() << ")";
19 }
20
21 #endif // POSIXX_SOCKET_INET_PRINT_HPP_