diff options
| author | 2012-04-05 13:58:18 +0200 | |
|---|---|---|
| committer | 2012-04-05 13:58:18 +0200 | |
| commit | cd07d72075739d6b59238d16fde6d02a1b97dbb9 (patch) | |
| tree | c14160d287a0b01dd6dd4843a0a001849624df04 /libusbmuxd/sock_stuff.h | |
| parent | b63c3355bd194d1df83b2f5aa0affab411397dd4 (diff) | |
| download | usbmuxd-cd07d72075739d6b59238d16fde6d02a1b97dbb9.tar.gz usbmuxd-cd07d72075739d6b59238d16fde6d02a1b97dbb9.tar.bz2 | |
libusbmuxd: fix usbmuxd_unsubscribe() by using shutdown() instead of SIGINT
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); |
