Windows Sockets 1.1应用实例(130)

2010-12-30 20:58:11 · 作者: · 浏览: 62995
if (len == 0)

           break;

       num_reads++;

       bytes_read += len;

      

       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);

      

       if (bTemp) {   /* To update our main display once */

           /* Do not use wsprintf() or you will add an extra char */

            _fmemcpy(prbuf, inet_ntoa(local.sin_addr), 4*sizeof(u_long));

          &n