if (p_WSAEventSelect) { if (startup) { events = (FD_CONNECT | FD_READ | FD_WRITE | FD_OOB | FD_CLOSE | FD_ACCEPT); netevent = CreateEvent(NULL, FALSE, FALSE, NULL); } else { events = 0; } if (p_WSAEventSelect(skt, netevent, events) == SOCKET_ERROR) { switch (p_WSAGetLastError()) { case WSAENETDOWN: return "Network is down"; default: return "WSAEventSelect(): unknown error"; } } }
char *do_select(SOCKET skt, int startup){    if (startup)	sftp_ssh_socket = skt;    else	sftp_ssh_socket = INVALID_SOCKET;    return NULL;}