summaryrefslogtreecommitdiffstats
path: root/include/zbxsock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/zbxsock.h')
-rwxr-xr-xinclude/zbxsock.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/zbxsock.h b/include/zbxsock.h
index 52b4834c..1b211f03 100755
--- a/include/zbxsock.h
+++ b/include/zbxsock.h
@@ -57,13 +57,15 @@
typedef struct sockaddr_in ZBX_SOCKADDR;
-int zbx_sock_read(ZBX_SOCKET sock, void *buf, int buflen, int timeout);
-int zbx_sock_write(ZBX_SOCKET sock, void *buf, int buflen);
+int zbx_sock_read(ZBX_SOCKET sock, void *buf, int buflen, int timeout);
+int zbx_sock_write(ZBX_SOCKET sock, void *buf, int buflen);
#if defined (WIN32)
+ int zbx_sock_init(void);
# define zbx_sock_close(sock) closesocket(sock)
# define zbx_sock_last_error() WSAGetLastError()
#else /* not WIN32 */
+# define zbx_sock_init() SUCCEED
# define zbx_sock_close(sock) close(sock)
# define zbx_sock_last_error() errno
#endif /* WIN32 */