From 562d95759f5f09e934b9c14b2f3dc30db897e5d5 Mon Sep 17 00:00:00 2001
From: Arvid Norberg
To advertise to other clients that you support, one bit from the reserved bytes is used.
-Right now, two bits have known usages.
---
-- [7] & 1 is used by Mainline for DHT support
-- [7] & 2 is used by XBT client for peer-exchange support
-
The bit selected for the extension protocol is bit 20 from the right (counting starts at 0). So (reserved_byte[5] & 0x10) is the expression to use for checking if the client supports extended messaging.
diff --git a/docs/extension_protocol.rst b/docs/extension_protocol.rst index 02281a0d6..c82541ca2 100644 --- a/docs/extension_protocol.rst +++ b/docs/extension_protocol.rst @@ -13,11 +13,6 @@ one you want to add. To advertise to other clients that you support, one bit from the reserved bytes is used. -Right now, two bits have known usages. - - * [7] & 1 is used by Mainline for DHT support - * [7] & 2 is used by XBT client for peer-exchange support - The bit selected for the extension protocol is bit 20 from the right (counting starts at 0). So (reserved_byte[5] & 0x10) is the expression to use for checking if the client supports extended messaging. diff --git a/docs/index.html b/docs/index.html index 53fbbc7fd..4961fcc3a 100755 --- a/docs/index.html +++ b/docs/index.html @@ -16,6 +16,7 @@Create a directory for the project:
-mkdir /home/you/work -cd /home/you/work +mkdir ${HOME}/work +cd ${HOME}/work
Check out boost, libtorrent, asio source code from cvs by executing the following commands:
+No password needed (just hit enter when prompted)
cvs -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost login cvs -z3 -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost checkout boost @@ -59,18 +62,19 @@ cvs -d:pserver:anonymous@asio.cvs.sourceforge.net:/cvsroot/asio loginStep 2: Building boost
To build boost, first build boost-build and then use that to build -the library themselves:
+the libraries themselves:-cd /home/you/boost -set BOOST_BUILD_PATH=/home/you/boost/tools/build/v2 -set BOOST_ROOT=/home/you/boost -cd /home/you/boost/tools/build/boost-build/jam_src +BASE_DIR=${HOME} ### Feel free to change this one. +BOOST_ROOT=${BASE_DIR}/boost +BOOST_BUILD_PATH=${BOOST_ROOT}/tools/build/v2 +cd ${BOOST_ROOT}/tools/jam/src ./build.sh -cp /bin.linuxx86/bjam /usr/bin -cd /home/you/boost -bjam -sTOOLS=gcc install +sudo cp ./bin.linuxx86/bjam /usr/bin +cd $BOOST_ROOT +sudo bjam -sTOOLS=gcc install-If you're successful you will see the followinf files in /usr/local/lib:
+It takes about 45 min. (so if you want to grap a coke, now is the time)
+If you're successful you will see the following files in /usr/local/lib:
libboost_date_time-gcc-d-1_31.so libboost_date_time-gcc-mt-d-1_31.so @@ -84,18 +88,51 @@ libboost_date_time-gcc-mt-1_31.aStep 3: Copy asio into the libtorrent directory
+Skip this step if you're using a released tarball.
Execute the following command:
-cp -R /home/you/asio/include/asio* /home/you/libtorrent/include/libtorrent +cp -R ${BASE_DIR}/asio/include/asio* ${BASE_DIR}/libtorrent/include/libtorrent+Step 4: Building libtorrent
+++building with autotools
+First of all, you need to install automake and autoconf. Many unix/linux systems +comes with these preinstalled. The prerequisites for building libtorrent are +boost.thread, boost.date_time and boost.filesystem. Those are the compiled boost +libraries needed. The headers-only libraries needed include (but is not necessarily +limited to) boost.bind, boost.ref, boost.multi_index, boost.optional, +boost.lexical_cast, boost.integer, boost.iterator, boost.tuple, boost.array, +boost.function, boost.smart_ptr, boost.preprocessor, boost.static_assert.
+If you want to build the client_test example, you'll also need boost.regex and boost.program_options.
+++generating the build system
+No build system is present if libtorrent is checked out from CVS - it needs to be +generated first. If you're building from a released tarball, you may skip directly +to running configure.
+Execute the following commands, in the given order, to generate the build system:
++cd ${BASE_DIR}/libtorrent +CXXFLAGS="-I/usr/local/include/boost-1_35 -I${BASE_DIR}/libtorrent/include/libtorrent" +LDFLAGS=-L/usr/local/lib + +aclocal -I m4 +autoheader +libtoolize --copy --force +automake --add-missing --copy --gnu +autoconf ++On darwin/OSX you have to run glibtoolize instead of libtoolize.
++running configure
To use the auto tools to build libtorrent, execute the following commands:
-cd /home/you/libtorrent -export CXXFLAGS=-I/usr/local/include/boost-1_35 -export LDFLAGS=-L/usr/local/lib +cd ${BASE_DIR}/libtorrent +CXXFLAGS="-I/usr/local/include/boost-1_35 -I${BASE_DIR}/libtorrent/include/libtorrent" +LDFLAGS=-L/usr/local/lib ./configure --with-boost-date-time=boost_date_time-gcc \ --with-boost-filesystem=boost_filesystem-gcc \ @@ -104,7 +141,7 @@ export LDFLAGS=-L/usr/local/lib make sudo make install-If successful, you will see the following file:
+If successful, you will see the following files:
/usr/local/lib/libtorrent.a /usr/local/lib/libtorrent.so.0 @@ -114,5 +151,6 @@ sudo make install