ctorrent stat collector
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
442B

  1. #ifndef _TCPSOCKET_H_
  2. #define _TCPSOCKET_H_
  3. #include <netinet/ip.h>
  4. #include "event.h"
  5. int tcp_listen(struct sockaddr_in *sa);
  6. int tcp_accept(int fd, struct sockaddr_in *sa);
  7. int tcp_connect(struct sockaddr_in *sa);
  8. int tcp_connect_nonblock(struct sockaddr_in *sa);
  9. int tcp_connect_error(int fd);
  10. struct event_fd * tcp_listen_event(
  11. const char *address,
  12. void *accept_handler,
  13. void *accept_privdata);
  14. #endif // _TCPSOCKET_H_