2 * Copyright 2001, 2002, 2003 David Mansfield and Cobite, Inc.
3 * See COPYING file for license information
14 #ifndef LISTEN_QUEUE_SIZE
15 #define LISTEN_QUEUE_SIZE 5
19 #define NO_REUSE_ADDR 0
21 int tcp_create_socket(int reuse_addr
);
22 int tcp_bind_and_listen(int sockfd
, unsigned short tcpport
);
23 int tcp_accept_connection(int sockfd
);
24 unsigned int tcp_get_client_ip(int fd
);
25 int tcp_connect(int sockfd
, const char *rem_addr
, unsigned short port
);
26 int convert_address(long *dest
, const char *addr_str
);
27 int tcp_get_local_address(int sockfd
, unsigned int *, unsigned short *);
33 #endif /* TCPSOCKET_H */