0.13 final sync
This commit is contained in:
parent
c464d64d46
commit
c3f15b8b1e
|
@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef TORRENT_BROADCAST_SOCKET_HPP_INCLUDED
|
#ifndef TORRENT_BROADCAST_SOCKET_HPP_INCLUDED
|
||||||
#define TORRENT_BROADCAST_SOCKET_HPP_INCLUDED
|
#define TORRENT_BROADCAST_SOCKET_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "libtorrent/config.hpp"
|
||||||
#include "libtorrent/socket.hpp"
|
#include "libtorrent/socket.hpp"
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
|
@ -41,21 +42,21 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
namespace libtorrent
|
namespace libtorrent
|
||||||
{
|
{
|
||||||
|
|
||||||
bool is_local(address const& a);
|
TORRENT_EXPORT bool is_local(address const& a);
|
||||||
bool is_loopback(address const& addr);
|
TORRENT_EXPORT bool is_loopback(address const& addr);
|
||||||
bool is_multicast(address const& addr);
|
TORRENT_EXPORT bool is_multicast(address const& addr);
|
||||||
bool is_any(address const& addr);
|
TORRENT_EXPORT bool is_any(address const& addr);
|
||||||
int cidr_distance(address const& a1, address const& a2);
|
TORRENT_EXPORT int cidr_distance(address const& a1, address const& a2);
|
||||||
|
|
||||||
int common_bits(unsigned char const* b1
|
int common_bits(unsigned char const* b1
|
||||||
, unsigned char const* b2, int n);
|
, unsigned char const* b2, int n);
|
||||||
|
|
||||||
address guess_local_address(asio::io_service&);
|
TORRENT_EXPORT address guess_local_address(asio::io_service&);
|
||||||
|
|
||||||
typedef boost::function<void(udp::endpoint const& from
|
typedef boost::function<void(udp::endpoint const& from
|
||||||
, char* buffer, int size)> receive_handler_t;
|
, char* buffer, int size)> receive_handler_t;
|
||||||
|
|
||||||
class broadcast_socket
|
class TORRENT_EXPORT broadcast_socket
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
broadcast_socket(asio::io_service& ios, udp::endpoint const& multicast_endpoint
|
broadcast_socket(asio::io_service& ios, udp::endpoint const& multicast_endpoint
|
||||||
|
|
|
@ -170,12 +170,14 @@ namespace libtorrent
|
||||||
|
|
||||||
void print(std::ostream& os, int indent = 0) const;
|
void print(std::ostream& os, int indent = 0) const;
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
|
|
||||||
void construct(data_type t);
|
void construct(data_type t);
|
||||||
void copy(const entry& e);
|
void copy(const entry& e);
|
||||||
void destruct();
|
void destruct();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
data_type m_type;
|
data_type m_type;
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1310
|
#if defined(_MSC_VER) && _MSC_VER < 1310
|
||||||
|
|
|
@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef TORRENT_ENUM_NET_HPP_INCLUDED
|
#ifndef TORRENT_ENUM_NET_HPP_INCLUDED
|
||||||
#define TORRENT_ENUM_NET_HPP_INCLUDED
|
#define TORRENT_ENUM_NET_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "libtorrent/config.hpp"
|
||||||
#include "libtorrent/socket.hpp"
|
#include "libtorrent/socket.hpp"
|
||||||
|
|
||||||
namespace libtorrent
|
namespace libtorrent
|
||||||
|
@ -46,18 +47,18 @@ namespace libtorrent
|
||||||
|
|
||||||
// returns a list of the configured IP interfaces
|
// returns a list of the configured IP interfaces
|
||||||
// on the machine
|
// on the machine
|
||||||
std::vector<ip_interface> enum_net_interfaces(asio::io_service& ios
|
TORRENT_EXPORT std::vector<ip_interface> enum_net_interfaces(asio::io_service& ios
|
||||||
, asio::error_code& ec);
|
, asio::error_code& ec);
|
||||||
|
|
||||||
// returns true if the specified address is on the same
|
// returns true if the specified address is on the same
|
||||||
// local network as the specified interface
|
// local network as the specified interface
|
||||||
bool in_subnet(address const& addr, ip_interface const& iface);
|
TORRENT_EXPORT bool in_subnet(address const& addr, ip_interface const& iface);
|
||||||
|
|
||||||
// returns true if the specified address is on the same
|
// returns true if the specified address is on the same
|
||||||
// local network as us
|
// local network as us
|
||||||
bool in_local_network(asio::io_service& ios, address const& addr, asio::error_code& ec);
|
TORRENT_EXPORT bool in_local_network(asio::io_service& ios, address const& addr, asio::error_code& ec);
|
||||||
|
|
||||||
address router_for_interface(address const interface, asio::error_code& ec);
|
TORRENT_EXPORT address router_for_interface(address const interface, asio::error_code& ec);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue