#ifdef HAVE_SYS_SENDFILE_H
#include <sys/sendfile.h>
#endif
+#include <sys/stat.h>
#include "w32socket.h"
#include "w32socket-internals.h"
+#include "w32error.h"
#include "w32handle.h"
#include "utils/mono-logger-internals.h"
#include "utils/mono-poll.h"
}
if ((flags & TF_DISCONNECT) == TF_DISCONNECT)
- CloseHandle (handle);
+ mono_w32handle_close (handle);
return TRUE;
}
return 0;
}
+gboolean
+mono_w32socket_close (SOCKET sock)
+{
+ return mono_w32handle_close (GINT_TO_POINTER (sock));
+}
+
gint
mono_w32socket_set_blocking (SOCKET socket, gboolean blocking)
{
void
mono_w32socket_set_last_error (gint32 error)
{
- SetLastError (error);
+ mono_w32error_set_last (error);
}
gint32
mono_w32socket_get_last_error (void)
{
- return GetLastError ();
+ return mono_w32error_get_last ();
}
gint32