1 #ifndef __WIN32_STREAMS_H
2 #define __WIN32_STREAMS_H
8 int read(int fd
, void *buf
, size_t count
);
9 int write(int fd
, const void *buf
, size_t count
);
11 unsigned int sleep(unsigned int seconds
); // does this belong here?
16 // this little trick allows us to define our own close/read/write
17 // (in streams.cc) that optionally call _close/_read/_write (defined in <io.h>)
18 #define __STDC__ 1 // prevents io.h from dllimporting close/read/write
30 class SocketFromFDMaker
34 socket_fd_pair m_pair
;
38 SocketFromFDMaker(int fd
, LPTHREAD_START_ROUTINE lpt
,
39 bool wait_for_termination
= false);
41 SOCKET
GetSocket() { return m_socket
; }
44 DWORD WINAPI
fd2socket_fwd(LPVOID lpThreadParameter
);
45 DWORD WINAPI
socket2fd_fwd(LPVOID lpThreadParameter
);
47 #endif // __WIN32_STREAMS_H