* outside of this file "shouldn't" have to worry about winsock specific error
* handling.
*/
-#define socket(x, y, z) win32_socket(x, y, z)
-#define connect(x, y, z) win32_connect(x, y, z)
-#define accept(x, y, z) win32_accept(x, y, z)
-#define shutdown(x, y) win32_shutdown(x, y)
+#define socket(x, y, z) win32_socket(x, y, z)
+#define connect(x, y, z) win32_connect(x, y, z)
+#define accept(x, y, z) win32_accept(x, y, z)
+#define shutdown(x, y) win32_shutdown(x, y)
+#define read(x, y, z) win32_read_socket(x, y, z)
+#define write(x, y, z) win32_write_socket(x, y, z)
/* Winsock uses int instead of the usual socklen_t */
typedef int socklen_t;
int win32_connect(SOCKET, struct sockaddr*, socklen_t);
SOCKET win32_accept(SOCKET, struct sockaddr*, socklen_t *);
int win32_shutdown(SOCKET, int);
+int win32_close_socket(SOCKET fd);
#define strtok_r(x, y, z) win32_strtok_r(x, y, z)
#define strsep(x,y) win32_strsep(x,y)
char *win32_strtok_r(char *s, const char *delim, char **lasts);
char *win32_strsep(char **stringp, const char *delim);
+ssize_t win32_read_socket(SOCKET fd, void *buf, int n);
+ssize_t win32_write_socket(SOCKET fd, void *buf, int n);
+
+
#endif