4 #if defined(HAVE_WINSOCK_H) && !defined(__CYGWIN__)
10 #include <netinet/in.h>
11 #include <arpa/inet.h>
24 #ifdef HAVE_SYS_SOCKET_H
25 # include <sys/socket.h>
27 #ifdef HAVE_NETINET_TCP_H
28 # include <netinet/tcp.h>
30 #if TIME_WITH_SYS_TIME
31 # include <sys/time.h>
35 # include <sys/time.h>
40 #ifdef HAVE_SYS_TYPES_H
41 # include <sys/types.h>
45 /* ToDo: featurise this */
46 #if !defined(cygwin32_TARGET_OS) && !defined(mingw32_TARGET_OS)
54 #endif /* !HAVE_WINSOCK_H */
57 StgInt acceptSocket (StgInt, StgAddr, StgAddr);
60 StgInt bindSocket (StgInt, StgAddr, StgInt, StgInt);
62 /* connectSocket.lc */
63 StgInt connectSocket (StgInt, StgAddr, StgInt, StgInt);
66 StgInt createSocket (StgInt, StgInt, StgInt);
69 StgInt getSockName (StgInt, StgAddr, StgAddr);
72 StgInt getPeerName (StgInt, StgAddr, StgAddr);
75 StgInt listenSocket (StgInt, StgInt);
77 /* shutdownSocket.lc */
78 StgInt shutdownSocket (StgInt, StgInt);
80 /* readDescriptor.lc */
81 StgInt readDescriptor (StgInt, StgAddr, StgInt);
84 StgInt recvFrom__ (StgInt, StgAddr, StgInt, StgAddr);
87 StgInt sendTo__ (StgInt, StgAddr, StgInt, StgAddr, StgInt);
90 StgInt getSocketOption__ (StgInt, StgInt);
91 StgInt setSocketOption__ (StgInt, StgInt, StgInt);
93 /* writeDescriptor.lc */
94 StgInt writeDescriptor (StgInt, StgAddr, StgInt);
97 #if defined(HAVE_WINSOCK_H) && !defined(__CYGWIN__)
99 void shutdownWinSock();
102 #endif /* !GHC_SOCKETS_H */