Flush (work in progress)
[mono.git] / mono / io-layer / sockets.h
index ed41af05637d92b09c8d712673430ede8fabb92f..bae67c4fa57d233040464bfeb95711be09ab50a1 100644 (file)
 #ifndef _WAPI_SOCKETS_H_
 #define _WAPI_SOCKETS_H_
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <netdb.h>
-#include <arpa/inet.h>
-
 #include "mono/io-layer/wapi.h"
 
 G_BEGIN_DECLS
@@ -67,6 +59,12 @@ typedef enum {
        TF_USE_KERNEL_APC       = 0x20
 } WapiTransmitFileFlags;
 
+typedef struct
+{
+       guint32 len;
+       gpointer buf;
+} WapiWSABuf;
+
 /* If we need to support more WSAIoctl commands then define these
  * using the bitfield flags method
  */
@@ -91,6 +89,14 @@ extern int WSAIoctl (guint32 handle, gint32 command,
                     gchar *input, gint i_len,
                     gchar *output, gint o_len, glong *written,
                     void *unused1, void *unused2);
-
+extern int WSARecv (guint32 handle, WapiWSABuf *buffers, guint32 count,
+                   guint32 *received, guint32 *flags,
+                   WapiOverlapped *overlapped, WapiOverlappedCB *complete);
+extern int WSASend (guint32 handle, WapiWSABuf *buffers, guint32 count,
+                   guint32 *sent, guint32 flags,
+                   WapiOverlapped *overlapped, WapiOverlappedCB *complete);
+
+gboolean TransmitFile (guint32 socket, gpointer file, guint32 bytes_to_write, guint32 bytes_per_send, WapiOverlapped *ol,
+                       WapiTransmitFileBuffers *tb, guint32 flags);
 G_END_DECLS
 #endif /* _WAPI_SOCKETS_H_ */