summaryrefslogtreecommitdiffstats
path: root/libusbmuxd/sock_stuff.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-04-05 13:58:18 +0200
committerGravatar Nikias Bassen2012-04-05 13:58:18 +0200
commitcd07d72075739d6b59238d16fde6d02a1b97dbb9 (patch)
treec14160d287a0b01dd6dd4843a0a001849624df04 /libusbmuxd/sock_stuff.h
parentb63c3355bd194d1df83b2f5aa0affab411397dd4 (diff)
downloadusbmuxd-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.h8
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 {
};
typedef enum fd_mode fd_mode;
+#ifdef WIN32
+#include <winsock2.h>
+#define SHUT_RD SD_READ
+#define SHUT_WR SD_WRITE
+#define SHUT_RDWR SD_BOTH
+#endif
+
#ifndef WIN32
int create_unix_socket(const char *filename);
int connect_unix_socket(const char *filename);
@@ -43,6 +50,7 @@ int connect_socket(const char *addr, uint16_t port);
#endif
int check_fd(int fd, fd_mode fdm, unsigned int timeout);
+int shutdown_socket(int fd, int how);
int close_socket(int fd);
int recv_buf(int fd, void *data, size_t size);