Changeset 1587 for trunk/src/wsock32/async.cpp
- Timestamp:
- Nov 4, 1999, 1:58:03 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wsock32/async.cpp
r1468 r1587 1 /* $Id: async.cpp,v 1.1 0 1999-10-27 08:38:03 phaller Exp $ */1 /* $Id: async.cpp,v 1.11 1999-11-04 00:58:03 phaller Exp $ */ 2 2 3 3 /* … … 32 32 #include <sys/ioctl.h> 33 33 #include <sys/select.h> 34 #include <sys/time.h> 34 35 35 36 #include <wsock32const.h> … … 60 61 fd_set *, 61 62 fd_set *, 62 struct timeval );63 struct timeval*); 63 64 64 65 // wsock32.cpp: error code translation … … 1002 1003 1003 1004 // finally do the select! 1005 #ifndef BSDSELECT 1004 1006 irc = os2_select(&sockWin, 1005 1007 (ulEvent & FD_READ) ? 1 : 0, … … 1007 1009 (ulEvent & FD_OOB) ? 1 : 0, 1008 1010 10000); // @@@PH timeout 1011 #else 1012 1013 // BSD implementation 1014 fd_set fds_read, *pfds_read = &fds_read; 1015 fd_set fds_write, *pfds_write = &fds_write; 1016 fd_set fds_exception,*pfds_exception = &fds_exception; 1017 struct timeval tv; 1018 1019 FD_ZERO(&fds_read); FD_SET(sockWin,&fds_read); 1020 FD_ZERO(&fds_write); FD_SET(sockWin,&fds_write); 1021 FD_ZERO(&fds_exception); FD_SET(sockWin,&fds_exception); 1022 1023 tv.tv_sec = 10; 1024 tv.tv_usec = 0; 1025 1026 if (!(ulEvent & FD_READ)) pfds_read = NULL; 1027 if (!(ulEvent & FD_WRITE)) pfds_write = NULL; 1028 if (!(ulEvent & FD_OOB)) pfds_exception = NULL; 1029 1030 irc = bsd_select(sockWin+1, 1031 pfds_read, 1032 pfds_write, 1033 pfds_exception, 1034 &tv); 1035 #endif 1036 1009 1037 if (irc < 0) /* an error occurred */ 1010 1038 { … … 1029 1057 irc = ioctl(sockWin, FIONREAD, (char *)&iUnknown, sizeof(iUnknown)); 1030 1058 if ( (irc == 0) && (iUnknown > 0)) 1031 usResult |= FD_READ ;1059 usResult |= FD_READ | FD_CONNECT; 1032 1060 } 1033 1061
Note:
See TracChangeset
for help on using the changeset viewer.