6 #include <netinet/in.h>
19 #ifdef HAVE_SYS_SOCKET_H
20 # include <sys/socket.h>
22 #ifdef HAVE_NETINET_TCP_H
23 # include <netinet/tcp.h>
25 #if TIME_WITH_SYS_TIME
26 # include <sys/time.h>
30 # include <sys/time.h>
35 #ifdef HAVE_SYS_TYPES_H
36 # include <sys/types.h>
40 /* ToDo: featurise this */
41 #ifndef cygwin32_TARGET_OS
50 StgInt acceptSocket PROTO((StgInt, StgAddr, StgAddr));
53 StgInt bindSocket PROTO((StgInt, StgAddr, StgInt, StgInt));
55 /* connectSocket.lc */
56 StgInt connectSocket PROTO((StgInt, StgAddr, StgInt, StgInt));
59 StgInt createSocket PROTO((StgInt, StgInt, StgInt));
62 StgInt getSockName PROTO((StgInt, StgAddr, StgAddr));
65 StgInt getPeerName PROTO((StgInt, StgAddr, StgAddr));
68 StgInt listenSocket PROTO((StgInt, StgInt));
70 /* shutdownSocket.lc */
71 StgInt shutdownSocket PROTO((StgInt, StgInt));
73 /* readDescriptor.lc */
74 StgInt readDescriptor PROTO((StgInt, StgAddr, StgInt));
77 StgInt recvFrom__ PROTO((StgInt, StgAddr, StgInt, StgAddr));
80 StgInt sendTo__ PROTO((StgInt, StgAddr, StgInt, StgAddr, StgInt));
83 StgInt getSocketOption__ PROTO((StgInt, StgInt));
84 StgInt setSocketOption__ PROTO((StgInt, StgInt, StgInt));
86 /* writeDescriptor.lc */
87 StgInt writeDescriptor PROTO((StgInt, StgAddr, StgInt));
90 #endif /* !GHC_SOCKETS_H */