2005-09-15 13:58:31 +00:00
|
|
|
|
|
|
|
#ifndef EL__PROTOCOL_BITTORRENT_PEERCONNECT_H
|
|
|
|
#define EL__PROTOCOL_BITTORRENT_PEERCONNECT_H
|
|
|
|
|
|
|
|
#include "network/state.h"
|
|
|
|
#include "protocol/bittorrent/common.h"
|
|
|
|
|
2020-10-05 18:14:55 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 13:58:31 +00:00
|
|
|
struct connection;
|
|
|
|
|
|
|
|
/* Sets up and tears down the peer listening socket. */
|
2008-08-03 12:24:26 +00:00
|
|
|
struct connection_state init_bittorrent_listening_socket(struct connection *conn);
|
2005-09-15 13:58:31 +00:00
|
|
|
void done_bittorrent_listening_socket(struct connection *conn);
|
|
|
|
|
|
|
|
void done_bittorrent_peer_connection(struct bittorrent_peer_connection *peer);
|
|
|
|
void set_bittorrent_peer_connection_timeout(struct bittorrent_peer_connection *peer);
|
|
|
|
|
|
|
|
struct bittorrent_connection *find_bittorrent_connection(bittorrent_id_T info_hash);
|
|
|
|
|
|
|
|
enum bittorrent_state
|
|
|
|
make_bittorrent_peer_connection(struct bittorrent_connection *bittorrent,
|
|
|
|
struct bittorrent_peer *peer_info);
|
|
|
|
|
2020-10-05 18:14:55 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 13:58:31 +00:00
|
|
|
#endif
|