Browse Source

inline closesocket

ithewei 3 years ago
parent
commit
8670c4d9cd
1 changed files with 4 additions and 1 deletions
  1. 4 1
      base/hsocket.h

+ 4 - 1
base/hsocket.h

@@ -65,7 +65,10 @@ HV_INLINE int nonblocking(int sockfd) {
 
 typedef int         SOCKET;
 #define INVALID_SOCKET  -1
-#define closesocket(fd) close(fd)
+
+HV_INLINE int closesocket(int sockfd) {
+    return close(sockfd);
+}
 
 #endif