The R Project SVN R

Rev

Rev 23246 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23246 Rev 25220
Line 45... Line 45...
45
#define EINPROGRESS             WSAEINPROGRESS
45
#define EINPROGRESS             WSAEINPROGRESS
46
#define EALREADY                WSAEALREADY
46
#define EALREADY                WSAEALREADY
47
#define _WINSOCKAPI_
47
#define _WINSOCKAPI_
48
extern void R_ProcessEvents(void);
48
extern void R_ProcessEvents(void);
49
extern void R_FlushConsole(void);
49
extern void R_FlushConsole(void);
-
 
50
#define R_SelectEx(n,rfd,wrd,efd,tv,ih) select(n,rfd,wrd,efd,tv)
50
#endif
51
#endif
51
 
52
 
52
#include <R_ext/R-ftp-http.h>
53
#include <R_ext/R-ftp-http.h>
53
#include <R_ext/PrtUtil.h>
54
#include <R_ext/PrtUtil.h>
54
 
55
 
Line 595... Line 596...
595
	    FD_ZERO(&rfd);
596
	    FD_ZERO(&rfd);
596
#endif
597
#endif
597
	    FD_SET(ctxt->fd, &rfd);
598
	    FD_SET(ctxt->fd, &rfd);
598
	    if(maxfd < ctxt->fd) maxfd = ctxt->fd;
599
	    if(maxfd < ctxt->fd) maxfd = ctxt->fd;
599
 
600
 
600
	    howmany = select(maxfd+1, &rfd, NULL, NULL, &tv);
601
	    howmany = R_SelectEx(maxfd+1, &rfd, NULL, NULL, &tv, NULL);
601
 
602
 
602
	    if (howmany < 0) {
603
	    if (howmany < 0) {
603
#ifdef DEBUG_HTTP
604
#ifdef DEBUG_HTTP
604
		perror("select in RxmlNanoHTTPRecv");
605
		perror("select in RxmlNanoHTTPRecv");
605
#endif
606
#endif
Line 884... Line 885...
884
#endif
885
#endif
885
	FD_ZERO(&wfd);
886
	FD_ZERO(&wfd);
886
	FD_SET(s, &wfd);
887
	FD_SET(s, &wfd);
887
	if(maxfd < s) maxfd = s;
888
	if(maxfd < s) maxfd = s;
888
 
889
 
889
	switch(select(maxfd+1, &rfd, &wfd, NULL, &tv))
890
	switch(R_SelectEx(maxfd+1, &rfd, &wfd, NULL, &tv, NULL))
890
	{
891
	{
891
	case 0:
892
	case 0:
892
	    /* Time out */
893
	    /* Time out */
893
	    used += tv.tv_sec + 1e-6 * tv.tv_usec;
894
	    used += tv.tv_sec + 1e-6 * tv.tv_usec;
894
	    if(used < timeout) continue;
895
	    if(used < timeout) continue;