]> git.meshlink.io Git - catta/blobdiff - src/compat/windows/wincompat.h
use WSAGetlastError/FormatMessage in place of strerror(errno) on Windows
[catta] / src / compat / windows / wincompat.h
index c736f75f938dc03868c75accbad1354239e21d37..8f62240c68be2e3cc9f9c57bfc1b98f283d503a2 100644 (file)
 #include <mswsock.h>
 
 
+// wrappers around WSAStartup/WSACleanup to avoid clutter
+void winsock_init(void);
+void winsock_exit(void);
+
+
+// the equivalent of strerror(errno) for Windows sockets
+char *errnostrsocket(void);
+
+
 // Winsock doesn't have recvmsg/sendmsg but offers the same functionality
 // with WSARecvMsg/WSASendMsg, so we implement the former in terms of the
 // latter.