21 lines
442 B
C
21 lines
442 B
C
#ifndef _TCPSOCKET_H_
|
|
#define _TCPSOCKET_H_
|
|
|
|
#include <netinet/ip.h>
|
|
|
|
#include "event.h"
|
|
|
|
int tcp_listen(struct sockaddr_in *sa);
|
|
int tcp_accept(int fd, struct sockaddr_in *sa);
|
|
int tcp_connect(struct sockaddr_in *sa);
|
|
|
|
int tcp_connect_nonblock(struct sockaddr_in *sa);
|
|
int tcp_connect_error(int fd);
|
|
|
|
struct event_fd * tcp_listen_event(
|
|
const char *address,
|
|
void *accept_handler,
|
|
void *accept_privdata);
|
|
|
|
#endif // _TCPSOCKET_H_
|