| 73 int gg_win32_recv(int sockfd, void *buf, size_t len, int flags); |
73 int gg_win32_recv(int sockfd, void *buf, size_t len, int flags); |
| 74 int gg_win32_send(int sockfd, const void *buf, size_t len, int flags); |
74 int gg_win32_send(int sockfd, const void *buf, size_t len, int flags); |
| 75 int gg_win32_setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen); |
75 int gg_win32_setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen); |
| 76 int gg_win32_socket(int domain, int type, int protocol); |
76 int gg_win32_socket(int domain, int type, int protocol); |
| 77 int gg_win32_socketpair(int sv[2]); |
77 int gg_win32_socketpair(int sv[2]); |
| |
78 |
| |
79 static inline void gg_win32_init_network(void) |
| |
80 { |
| |
81 WSADATA wsaData; |
| |
82 |
| |
83 if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) { |
| |
84 perror("WSAStartup"); |
| |
85 exit(1); |
| |
86 } |
| |
87 } |
| |
88 |
| 78 #else |
89 #else |
| 79 # include <sys/ioctl.h> |
90 # include <sys/ioctl.h> |
| 80 # include <sys/types.h> |
91 # include <sys/types.h> |
| 81 # include <sys/socket.h> |
92 # include <sys/socket.h> |
| 82 # include <netinet/in.h> |
93 # include <netinet/in.h> |