Parent Directory | Revision Log
Initial revision
1 | bearsoft | 1.1 | #ifndef __NetWorkTools_H__ |
2 | #define __NetWorkTools_H__ | ||
3 | |||
4 | #ifdef sun | ||
5 | #include <sys/socket.h> | ||
6 | #include <sys/types.h> | ||
7 | #define SOCKET_ERROR -1 | ||
8 | #endif | ||
9 | |||
10 | #ifdef WIN32 | ||
11 | #include <winsock.h> | ||
12 | #endif | ||
13 | |||
14 | #ifdef linux | ||
15 | #include <sys/socket.h> | ||
16 | #include <sys/types.h> | ||
17 | #include <unistd.h> | ||
18 | #define SOCKET_ERROR -1 | ||
19 | #endif | ||
20 | |||
21 | #include <iostream> | ||
22 | |||
23 | #define socketError 0 | ||
24 | #define connectionOkey 1 | ||
25 | #define droppedConnection 2 | ||
26 | |||
27 | class NetWorkTools | ||
28 | { | ||
29 | |||
30 | public: | ||
31 | NetWorkTools::NetWorkTools(); | ||
32 | NetWorkTools::~NetWorkTools(); | ||
33 | |||
34 | int sendData(int socket, char *buffer, int size); | ||
35 | char *recieveHttpData(int socket); | ||
36 | |||
37 | |||
38 | private: | ||
39 | |||
40 | }; | ||
41 | |||
42 | #endif |
root@recompile.se | ViewVC Help |
Powered by ViewVC 1.1.26 |