Changeset 32801 in vbox
- Timestamp:
- Sep 28, 2010 4:17:46 PM (14 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/tcp.cpp
r32276 r32801 935 935 if (RT_SUCCESS(rc)) 936 936 { 937 uint64_t u64Start = RTTimeMilliTS(); 938 for (;;) 937 size_t cbReceived = 0; 938 uint64_t u64Start = RTTimeMilliTS(); 939 while ( cbReceived < _1G 940 && RTTimeMilliTS() - u64Start < 30000) 939 941 { 940 rc = RTSocketSelectOne(Sock, 1000); 942 uint32_t fEvents; 943 rc = RTSocketSelectOneEx(Sock, RTSOCKET_EVT_READ | RTSOCKET_EVT_ERROR, &fEvents, 1000); 941 944 if (rc == VERR_TIMEOUT) 942 { 943 if (RTTimeMilliTS() - u64Start > 30000) 944 break; 945 } 946 else if (rc != VINF_SUCCESS) 945 continue; 946 if (RT_FAILURE(rc)) 947 947 break; 948 { 949 char abBitBucket[16*_1K]; 950 ssize_t cbBytesRead = recv(RTSocketToNative(Sock), &abBitBucket[0], sizeof(abBitBucket), MSG_NOSIGNAL); 951 if (cbBytesRead == 0) 952 break; /* orderly shutdown in progress */ 953 if (cbBytesRead < 0) 954 break; /* some kind of error, never mind which... */ 955 } 956 } /* forever */ 948 if (fEvents & RTSOCKET_EVT_ERROR) 949 break; 950 951 char abBitBucket[16*_1K]; 952 size_t cbRead; 953 rc = RTSocketReadNB(Sock, &abBitBucket[0], sizeof(abBitBucket), &cbRead); 954 if (RT_FAILURE(rc)) 955 break; /* some kind of error, never mind which... */ 956 if (rc != VINF_TRY_AGAIN && !cbRead) 957 break; /* orderly shutdown in progress */ 958 959 cbReceived += cbRead; 960 } 957 961 } 958 962 } -
trunk/src/VBox/Runtime/testcase/Makefile.kmk
r32611 r32801 102 102 tstRTSystemQueryDmi \ 103 103 tstRTSystemQueryOsInfo \ 104 tstRTTcp-1 \ 104 105 tstRTTemp \ 105 106 tstTermCallbacks \ … … 430 431 tstRTSystemQueryOsInfo_SOURCES = tstRTSystemQueryOsInfo.cpp 431 432 433 tstRTTcp-1_TEMPLATE = VBOXR3TSTEXE 434 tstRTTcp-1_SOURCES = tstRTTcp-1.cpp 435 432 436 tstRTTemp_TEMPLATE = VBOXR3TSTEXE 433 437 tstRTTemp_SOURCES = tstRTTemp.cpp
Note:
See TracChangeset
for help on using the changeset viewer.