PageRenderTime 42ms CodeModel.GetById 38ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/asio/ip/unicast.hpp

http://hadesmem.googlecode.com/
C++ Header | 69 lines | 25 code | 9 blank | 35 comment | 1 complexity | 58baeac148a8cdbd61e9e6e418403a36 MD5 | raw file
 1//
 2// ip/unicast.hpp
 3// ~~~~~~~~~~~~~~
 4//
 5// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 6//
 7// Distributed under the Boost Software License, Version 1.0. (See accompanying
 8// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 9//
10
11#ifndef BOOST_ASIO_IP_UNICAST_HPP
12#define BOOST_ASIO_IP_UNICAST_HPP
13
14#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15# pragma once
16#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18#include <boost/asio/detail/config.hpp>
19#include <cstddef>
20#include <boost/asio/ip/detail/socket_option.hpp>
21
22#include <boost/asio/detail/push_options.hpp>
23
24namespace boost {
25namespace asio {
26namespace ip {
27namespace unicast {
28
29/// Socket option for time-to-live associated with outgoing unicast packets.
30/**
31 * Implements the IPPROTO_IP/IP_UNICAST_TTL socket option.
32 *
33 * @par Examples
34 * Setting the option:
35 * @code
36 * boost::asio::ip::udp::socket socket(io_service); 
37 * ...
38 * boost::asio::ip::unicast::hops option(4);
39 * socket.set_option(option);
40 * @endcode
41 *
42 * @par
43 * Getting the current option value:
44 * @code
45 * boost::asio::ip::udp::socket socket(io_service); 
46 * ...
47 * boost::asio::ip::unicast::hops option;
48 * socket.get_option(option);
49 * int ttl = option.value();
50 * @endcode
51 *
52 * @par Concepts:
53 * GettableSocketOption, SettableSocketOption.
54 */
55#if defined(GENERATING_DOCUMENTATION)
56typedef implementation_defined hops;
57#else
58typedef boost::asio::ip::detail::socket_option::unicast_hops<
59  IPPROTO_IP, IP_TTL, IPPROTO_IPV6, IPV6_UNICAST_HOPS> hops;
60#endif
61
62} // namespace unicast
63} // namespace ip
64} // namespace asio
65} // namespace boost
66
67#include <boost/asio/detail/pop_options.hpp>
68
69#endif // BOOST_ASIO_IP_UNICAST_HPP