Add Eduardo's email to copyright header files
[MonkeyD.git] / src / include / socket.h
blobe9cd976c64982671ade3d42d8932c947936fbc46
1 /* Monkey HTTP Daemon
2 * ------------------
3 * Copyright (C) 2001-2010, Eduardo Silva P. <edsiper@gmail.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef MK_SOCKET_H
21 #define MK_SOCKET_H
23 /* Socket_Timeout() */
24 #define ST_RECV 0
25 #define ST_SEND 1
27 #define TCP_CORK_ON 1
28 #define TCP_CORK_OFF 0
30 int mk_socket_set_cork_flag(int fd, int state);
31 int mk_socket_set_tcp_nodelay(int sockfd);
32 int mk_socket_set_nonblocking(int sockfd);
34 int mk_socket_get_ip(int socket, char *ipv4);
35 int mk_socket_close(int socket);
36 int mk_socket_timeout(int s, char *buf, int len, int timeout, int recv_send);
38 int mk_socket_create();
39 int mk_socket_connect(int sockfd, char *server, int port);
40 void mk_socket_reset(int socket);
41 int mk_socket_server(int port, char *listen_addr);
43 #endif