A clone of btpd with my configuration changes.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

41 lignes
952 B

  1. #ifndef BTPD_NET_H
  2. #define BTPD_NET_H
  3. #define MSG_CHOKE 0
  4. #define MSG_UNCHOKE 1
  5. #define MSG_INTEREST 2
  6. #define MSG_UNINTEREST 3
  7. #define MSG_HAVE 4
  8. #define MSG_BITFIELD 5
  9. #define MSG_REQUEST 6
  10. #define MSG_PIECE 7
  11. #define MSG_CANCEL 8
  12. #define RATEHISTORY 20
  13. extern struct peer_tq net_unattached;
  14. extern struct peer_tq net_bw_readq;
  15. extern struct peer_tq net_bw_writeq;
  16. extern unsigned net_npeers;
  17. void net_init(void);
  18. void net_on_tick(void);
  19. void net_create(struct torrent *tp);
  20. void net_kill(struct torrent *tp);
  21. void net_start(struct torrent *tp);
  22. void net_stop(struct torrent *tp);
  23. int net_active(struct torrent *tp);
  24. int net_torrent_has_peer(struct net *n, const uint8_t *id);
  25. void net_read_cb(int sd, short type, void *arg);
  26. void net_write_cb(int sd, short type, void *arg);
  27. int net_connect2(struct sockaddr *sa, socklen_t salen, int *sd);
  28. int net_connect(const char *ip, int port, int *sd);
  29. #endif