2 #ifndef EL__PROTOCOL_BITTORRENT_PEERCONNECT_H
3 #define EL__PROTOCOL_BITTORRENT_PEERCONNECT_H
5 #include "network/state.h"
6 #include "protocol/bittorrent/common.h"
10 /* Sets up and tears down the peer listening socket. */
11 struct connection_state
init_bittorrent_listening_socket(struct connection
*conn
);
12 void done_bittorrent_listening_socket(struct connection
*conn
);
14 void done_bittorrent_peer_connection(struct bittorrent_peer_connection
*peer
);
15 void set_bittorrent_peer_connection_timeout(struct bittorrent_peer_connection
*peer
);
17 struct bittorrent_connection
*find_bittorrent_connection(bittorrent_id_T info_hash
);
20 make_bittorrent_peer_connection(struct bittorrent_connection
*bittorrent
,
21 struct bittorrent_peer
*peer_info
);