torrent-stats/tcpsocket.h

21 lines
442 B
C
Raw Normal View History

2007-05-15 17:39:34 +02:00
#ifndef _TCPSOCKET_H_
#define _TCPSOCKET_H_
#include <netinet/ip.h>
2009-05-03 14:20:03 +02:00
#include "event.h"
2007-05-15 17:39:34 +02:00
int tcp_listen(struct sockaddr_in *sa);
2009-05-03 14:20:03 +02:00
int tcp_accept(int fd, struct sockaddr_in *sa);
2007-05-15 17:39:34 +02:00
int tcp_connect(struct sockaddr_in *sa);
int tcp_connect_nonblock(struct sockaddr_in *sa);
int tcp_connect_error(int fd);
2009-05-03 14:20:03 +02:00
struct event_fd * tcp_listen_event(
const char *address,
void *accept_handler,
void *accept_privdata);
2007-05-15 17:39:34 +02:00
#endif // _TCPSOCKET_H_