mirror of https://github.com/BOINC/boinc.git
windows async select
svn path=/trunk/boinc/; revision=949
This commit is contained in:
parent
cea4b691d9
commit
b45b23df1b
|
@ -74,7 +74,7 @@ CLIENT_STATE::CLIENT_STATE() {
|
|||
platform_name = HOST;
|
||||
exit_after_app_start_secs = 0;
|
||||
app_started = 0;
|
||||
max_transfer_rate = 9999;
|
||||
max_transfer_rate = 999999999;
|
||||
max_bytes = 0;
|
||||
user_idle = true;
|
||||
use_http_proxy = false;
|
||||
|
|
|
@ -22,8 +22,10 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "winsock.h"
|
||||
#include <afxwin.h>
|
||||
#include <winsock.h>
|
||||
#include "Win_net.h"
|
||||
#include "wingui_mainwindow.h"
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TIME_H
|
||||
|
@ -125,6 +127,14 @@ int NET_XFER::open_server() {
|
|||
NetClose();
|
||||
return -1;
|
||||
}
|
||||
if (WSAAsyncSelect( fd, g_myWnd->GetSafeHwnd(), WM_TIMER, FD_READ|FD_WRITE )) {
|
||||
errno = WSAGetLastError();
|
||||
if (errno != WSAEINPROGRESS && errno != WSAEWOULDBLOCK) {
|
||||
closesocket(fd);
|
||||
NetClose();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (errno != EINPROGRESS) {
|
||||
close(fd);
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#define EDGE_BUFFER 2 // buffer pixels around edge of client
|
||||
|
||||
#define ID_TIMER 104 // timer id
|
||||
#define TIMEOUT_WAIT 100 // timeout sleep time (in milliseconds)
|
||||
#define TIMEOUT_WAIT 1000 // timeout sleep time (in milliseconds)
|
||||
|
||||
#define STATUS_ICON_ID (WM_USER + 1) // id for notifications from status icon
|
||||
|
||||
|
|
Loading…
Reference in New Issue