diff options
Diffstat (limited to 'libusbmuxd/sock_stuff.h')
| -rw-r--r-- | libusbmuxd/sock_stuff.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libusbmuxd/sock_stuff.h b/libusbmuxd/sock_stuff.h index eb9622c..5efcd27 100644 --- a/libusbmuxd/sock_stuff.h +++ b/libusbmuxd/sock_stuff.h | |||
| @@ -33,6 +33,13 @@ enum fd_mode { | |||
| 33 | }; | 33 | }; |
| 34 | typedef enum fd_mode fd_mode; | 34 | typedef enum fd_mode fd_mode; |
| 35 | 35 | ||
| 36 | #ifdef WIN32 | ||
| 37 | #include <winsock2.h> | ||
| 38 | #define SHUT_RD SD_READ | ||
| 39 | #define SHUT_WR SD_WRITE | ||
| 40 | #define SHUT_RDWR SD_BOTH | ||
| 41 | #endif | ||
| 42 | |||
| 36 | #ifndef WIN32 | 43 | #ifndef WIN32 |
| 37 | int create_unix_socket(const char *filename); | 44 | int create_unix_socket(const char *filename); |
| 38 | int connect_unix_socket(const char *filename); | 45 | int connect_unix_socket(const char *filename); |
| @@ -43,6 +50,7 @@ int connect_socket(const char *addr, uint16_t port); | |||
| 43 | #endif | 50 | #endif |
| 44 | int check_fd(int fd, fd_mode fdm, unsigned int timeout); | 51 | int check_fd(int fd, fd_mode fdm, unsigned int timeout); |
| 45 | 52 | ||
| 53 | int shutdown_socket(int fd, int how); | ||
| 46 | int close_socket(int fd); | 54 | int close_socket(int fd); |
| 47 | 55 | ||
| 48 | int recv_buf(int fd, void *data, size_t size); | 56 | int recv_buf(int fd, void *data, size_t size); |
