Windows Sockets 1.1应用实例(113)

2010-12-30 20:58:11 · 作者: · 浏览: 63027
p; 

        num_reads++;

        if (len != SOCKET_ERROR)

            bytes_read += len;

        /* Print the statistics gathered    */

        wsprintf((LPSTR)prbuf,"%d\n",num_reads);

        SetDlgItemText(hOurDlg, IDD_WRITE, (LPSTR) prbuf);

 

        wsprintf((LPSTR)prbuf,"%ld\n",bytes_read);

        SetDlgItemText(hOurDlg, IDD_SENT, (LPSTR) prbuf);

             

        time(&last_time);

     } /* end: while */

     total_time = timeout;

    

     wsprintf((LPSTR)pr