0.13 final sync

This commit is contained in:
Marcos Pinto 2008-04-07 05:13:36 +00:00
parent 97e8cdaac8
commit f39e3c69a3
3 changed files with 16 additions and 12 deletions

View File

@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef TORRENT_BROADCAST_SOCKET_HPP_INCLUDED
#define TORRENT_BROADCAST_SOCKET_HPP_INCLUDED
#include "libtorrent/config.hpp"
#include "libtorrent/socket.hpp"
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
@ -41,21 +42,21 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent
{
bool is_local(address const& a);
bool is_loopback(address const& addr);
bool is_multicast(address const& addr);
bool is_any(address const& addr);
int cidr_distance(address const& a1, address const& a2);
TORRENT_EXPORT bool is_local(address const& a);
TORRENT_EXPORT bool is_loopback(address const& addr);
TORRENT_EXPORT bool is_multicast(address const& addr);
TORRENT_EXPORT bool is_any(address const& addr);
TORRENT_EXPORT int cidr_distance(address const& a1, address const& a2);
int common_bits(unsigned char const* b1
, 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
, char* buffer, int size)> receive_handler_t;
class broadcast_socket
class TORRENT_EXPORT broadcast_socket
{
public:
broadcast_socket(asio::io_service& ios, udp::endpoint const& multicast_endpoint

View File

@ -170,12 +170,14 @@ namespace libtorrent
void print(std::ostream& os, int indent = 0) const;
private:
protected:
void construct(data_type t);
void copy(const entry& e);
void destruct();
private:
data_type m_type;
#if defined(_MSC_VER) && _MSC_VER < 1310

View File

@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef TORRENT_ENUM_NET_HPP_INCLUDED
#define TORRENT_ENUM_NET_HPP_INCLUDED
#include "libtorrent/config.hpp"
#include "libtorrent/socket.hpp"
namespace libtorrent
@ -46,18 +47,18 @@ namespace libtorrent
// returns a list of the configured IP interfaces
// 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);
// returns true if the specified address is on the same
// 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
// 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