Windows Sockets 1.1应用实例(101)

2010-12-30 20:58:11 · 作者: · 浏览: 63053
while (bytes_sent < total_len){/* while still bytes to send */

       do {

           ;

       } while (ShoutBlockingHook()); /* Dispatch messages if any */

      

       if (run_cancelled) {

           WSASetLastError(WSAEINTR);

           break;     /* Non-blocking mode was cancelled */

       }

          

       tmp = send(hSock, (char FAR *) &DataBuffer, send_len, 0);

       if (tmp == SOCKET_ERROR) {

           if (h_errno == WSAEWOULDBLOCK) /* if no data, read again */

           &n