1 /* LibTcp - Released underOpen Software License v. 2.0
3 * This Open Software License (the "License") applies to any original work of authorship
4 * (the "Original Work") whose owner (the "Licensor") has placed the following notice
5 * immediately following the copyright notice for the Original Work:
7 * Licensed under the Open Software License version 2.0
9 * See http://www.opensource.org/licenses/osl-2.0.php or the LICENSE file for more
13 #ifndef _LIBTCP_COMMON_H_
20 #include <sys/resource.h>
22 #include <sys/types.h>
23 #include <sys/socket.h>
24 #include <netinet/in.h>
25 #include <arpa/inet.h>
28 #define LIBTCP_DEFAULT_UDP_PORT 5000
29 #define LIBTCP_DEFAULT_TCP_PORT 5000
33 int libtcp_open_activo (const char *server, int port);
34 int libtcp_open_pasivo (int port);
35 int libtcp_receive (int fd, char *ptr, unsigned int maxlong);
36 int libtcp_receive_bin (int fd, void *ptr, unsigned int maxlong);
37 int libtcp_send (int fd, const void *ptr, unsigned int n);
39 #endif // _LIBTCP_COMMON_H_