1 | /* |
2 | * This Source Code Form is subject to the terms of the Mozilla Public |
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
5 | * |
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. |
7 | */ |
8 | |
9 | /* This file contains the prototype declarations of the stream |
10 | * functions that need special include files (sockets) */ |
11 | |
12 | #ifndef _STREAM_SOCKET_H_ |
13 | #define _STREAM_SOCKET_H_ |
14 | |
15 | #ifdef HAVE_SYS_SOCKET_H |
16 | #include <sys/socket.h> |
17 | #endif |
18 | #ifdef HAVE_WINSOCK_H |
19 | # include <winsock.h> |
20 | #endif |
21 | |
22 | #ifndef INVALID_SOCKET |
23 | #define INVALID_SOCKET (-1) |
24 | #endif |
25 | #ifndef SOCKET_ERROR |
26 | #define SOCKET_ERROR (-1) |
27 | #endif |
28 | |
29 | stream_export stream *socket_rstream(SOCKET socket, const char *name); |
30 | stream_export stream *socket_wstream(SOCKET socket, const char *name); |
31 | |
32 | #endif /* _STREAM_SOCKET_H_ */ |
33 | |