best makefile
[webserver.git] / server.h
CommitLineData
00afbb65
LM
1#ifndef __SERVER_H__
2#define __SERVER_H__
3
4#ifdef _WIN32 /* Windows */
5#include <ws2tcpip.h>
6typedef SOCKET socket_t;
7#else /* Posix */
8typedef int socket_t;
9#endif
10
89f0e084
LM
11void init_network_context (void);
12void terminate_network_context (void);
13
7d4815a1
LM
14int open_listening_socket (int port);
15int accept_incoming_connection (void);
89f0e084 16
7d4815a1 17void close_connection (void);
89f0e084 18
cae06547
LM
19int receive_data (char **pdata);
20int send_data (char *data, int len);
00afbb65
LM
21
22#endif /* __SERVER_H__ */
23
24/* vim: set ts=4 sw=4 et: */