static gint socket_fd_recv(gint fd, gchar *buf, gint len, gint flags) { if (socket_fd_check_io(fd, G_IO_IN) < 0) return -1; return recv(fd, buf, len, flags); }
gint socket_fd_write(gint fd, const gchar *buf, gint len) { if (socket_fd_check_io(fd, G_IO_OUT) < 0) return -1; #ifdef G_OS_WIN32 return send(fd, buf, len, 0); #else return write(fd, buf, len); #endif }
static gint socket_fd_read(gint fd, gchar *buf, gint len) { if (socket_fd_check_io(fd, G_IO_IN) < 0) return -1; #ifdef G_OS_WIN32 return recv(fd, buf, len, 0); #else return read(fd, buf, len); #endif }
gint socket_fd_write(gint fd, const gchar *buf, gint len) { if (socket_fd_check_io(fd, G_IO_OUT) < 0) return -1; return write(fd, buf, len); }
static gint socket_fd_read(gint fd, gchar *buf, gint len) { if (socket_fd_check_io(fd, G_IO_IN) < 0) return -1; return read(fd, buf, len); }