Bug 1013: Don't assume errno is between 0 and 100000
[elinks.git] / src / protocol / bittorrent / peerconnect.h
blob08b695c219ac664e985fbe21ba6b47d97c367000
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"
8 struct connection;
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);
19 enum bittorrent_state
20 make_bittorrent_peer_connection(struct bittorrent_connection *bittorrent,
21 struct bittorrent_peer *peer_info);
23 #endif