~cmiller/ubuntu/quantal/deluge/fix-parameter-move-storage

« back to all changes in this revision

Viewing changes to libtorrent/include/asio/ip/v6_only.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Cristian Greco
  • Date: 2009-11-13 02:39:45 UTC
  • mfrom: (4.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091113023945-te1bybo2912ejzuc
Tags: 1.2.0~rc3-4
* debian/control: bump build-dep on python-setuptools to (>= 0.6c9).
* debian/patches:
  - 25_r5921_fastresume_files.patch
    new, should fix problems with fresh configs;
  - 30_r5931_ipc_lockfile.patch:
    new, should fix an issue where Deluge will fail to start if there is a
    stale ipc lockfile. (Closes: #555849)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//
2
 
// v6_only.hpp
3
 
// ~~~~~~~~~~~
4
 
//
5
 
// Copyright (c) 2003-2008 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 ASIO_IP_V6_ONLY_HPP
12
 
#define ASIO_IP_V6_ONLY_HPP
13
 
 
14
 
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15
 
# pragma once
16
 
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
 
 
18
 
#include "asio/detail/push_options.hpp"
19
 
 
20
 
#include "asio/detail/socket_option.hpp"
21
 
 
22
 
namespace asio {
23
 
namespace ip {
24
 
 
25
 
/// Socket option for determining whether an IPv6 socket supports IPv6
26
 
/// communication only.
27
 
/**
28
 
 * Implements the IPPROTO_IPV6/IP_V6ONLY socket option.
29
 
 *
30
 
 * @par Examples
31
 
 * Setting the option:
32
 
 * @code
33
 
 * asio::ip::tcp::socket socket(io_service); 
34
 
 * ...
35
 
 * asio::ip::v6_only option(true);
36
 
 * socket.set_option(option);
37
 
 * @endcode
38
 
 *
39
 
 * @par
40
 
 * Getting the current option value:
41
 
 * @code
42
 
 * asio::ip::tcp::socket socket(io_service); 
43
 
 * ...
44
 
 * asio::ip::v6_only option;
45
 
 * socket.get_option(option);
46
 
 * bool v6_only = option.value();
47
 
 * @endcode
48
 
 *
49
 
 * @par Concepts:
50
 
 * GettableSocketOption, SettableSocketOption.
51
 
 */
52
 
#if defined(GENERATING_DOCUMENTATION)
53
 
typedef implementation_defined v6_only;
54
 
#elif defined(IPV6_V6ONLY)
55
 
typedef asio::detail::socket_option::boolean<
56
 
    IPPROTO_IPV6, IPV6_V6ONLY> v6_only;
57
 
#else
58
 
typedef asio::detail::socket_option::boolean<
59
 
    asio::detail::custom_socket_option_level,
60
 
    asio::detail::always_fail_option> v6_only;
61
 
#endif
62
 
 
63
 
} // namespace ip
64
 
} // namespace asio
65
 
 
66
 
#include "asio/detail/pop_options.hpp"
67
 
 
68
 
#endif // ASIO_IP_V6_ONLY_HPP