mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-17 23:52:30 +00:00
* Using SocketAddress instead of std::string/uint16_t for peer
addresses. * Tracker key is now an uint32_t instead of std::string. * Added client address to UDP tracker requests. * Added a check for FD_SETSIZE and _SC_OPEN_MAX in the client. A warning is issued if max open files and sockets exceed either of these. * Cleaned up the API, propably quite close to what will be in the slush'ed API. * Swapped emit and close order in TrackerHttp. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@499 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <istream>
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
#include <sigc++/bind.h>
|
||||
#include <sigc++/hide.h>
|
||||
#include <torrent/bencode.h>
|
||||
@@ -70,6 +72,16 @@ Manager::initialize() {
|
||||
CurlStack::init();
|
||||
listen_open();
|
||||
|
||||
if (torrent::get_max_open_files() + torrent::get_max_open_sockets() + 32 > FD_SETSIZE) {
|
||||
m_logImportant.push_front("Warning: Max open sockets and files exceeds FD_SETSIZE");
|
||||
m_logComplete.push_front("Warning: Max open sockets and files exceeds FD_SETSIZE");
|
||||
}
|
||||
|
||||
if (torrent::get_max_open_files() + torrent::get_max_open_sockets() + 32 > (unsigned int)sysconf(_SC_OPEN_MAX)) {
|
||||
m_logImportant.push_front("Warning: Max open sockets and files exceeds _SC_OPEN_MAX");
|
||||
m_logComplete.push_front("Warning: Max open sockets and files exceeds _SC_OPEN_MAX");
|
||||
}
|
||||
|
||||
// Register slots to be called when a download is inserted/erased,
|
||||
// opened or closed.
|
||||
m_downloadList.slot_map_insert()["0_initialize_bencode"] = sigc::mem_fun(*this, &Manager::initialize_bencode);
|
||||
|
||||
Reference in New Issue
Block a user