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