ELinks 0.18.0
|
#include <errno.h>
#include <sys/types.h>
#include "elinks.h"
#include "config/options.h"
#include "main/select.h"
#include "main/timer.h"
#include "network/connection.h"
#include "network/socket.h"
#include "osdep/osdep.h"
#include "protocol/bittorrent/bittorrent.h"
#include "protocol/bittorrent/common.h"
#include "protocol/bittorrent/connection.h"
#include "protocol/bittorrent/peerconnect.h"
#include "protocol/bittorrent/peerwire.h"
#include "protocol/bittorrent/piececache.h"
#include "protocol/protocol.h"
#include "protocol/uri.h"
#include "util/bitfield.h"
#include "util/memory.h"
#include "util/string.h"
Macros | |
#define | BITTORRENT_PEER_HANDSHAKE_SIZE (1 + 19 + 8 + 20 + 20) |
#define | bittorrent_peer_is_sending(peer) ((peer)->socket->write_buffer) |
#define | add_to_handshake(handshake, i, data) |
Enumerations | |
enum | bittorrent_handshake_state { BITTORRENT_PEER_HANDSHAKE_OK , BITTORRENT_PEER_HANDSHAKE_ERROR , BITTORRENT_PEER_HANDSHAKE_INFO_HASH , BITTORRENT_PEER_HANDSHAKE_INCOMPLETE } |
Variables | |
static const bittorrent_id_T | BITTORRENT_ID = {'\023','B','i','t','T','o','r','r','e','n','t',' ','p','r','o','t','o','c','o','l'} |
#define add_to_handshake | ( | handshake, | |
i, | |||
data ) |
#define BITTORRENT_PEER_HANDSHAKE_SIZE (1 + 19 + 8 + 20 + 20) |
#define bittorrent_peer_is_sending | ( | peer | ) | ((peer)->socket->write_buffer) |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
void read_bittorrent_peer_handshake | ( | struct socket * | socket, |
struct read_buffer * | buffer ) |
|
static |
void send_bittorrent_peer_handshake | ( | struct socket * | socket | ) |
void send_bittorrent_peer_message | ( | struct bittorrent_peer_connection * | peer, |
bittorrent_message_id_TT | message_id, | ||
... ) |
|
static |
|
static |
void update_bittorrent_peer_connection_state | ( | struct bittorrent_peer_connection * | peer | ) |
void update_bittorrent_peer_connection_stats | ( | struct bittorrent_peer_connection * | peer, |
uint32_t | downloaded, | ||
uint32_t | have_piece, | ||
uint32_t | uploaded ) |
|
static |