Windows Sockets 1.1应用实例(122)

2010-12-30 20:58:11 · 作者: · 浏览: 63007
hOurDlg, IDD_SENT, (LPSTR) prbuf);

    } /* end while */

    time(&end);

   

    if (total_time = (long) difftime(end, start)) {

       /* Print the statistics gathered    */

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

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

      

       ltemp = write_count/total_time;

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

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

      

       ltemp = bytes_sent/total_time;

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

       SetDlgItemText(hOurDlg, IDD_BYTES,