Windows Sockets 1.1应用实例(123)

2010-12-30 20:58:11 · 作者: · 浏览: 63006
(LPSTR) prbuf);

      

       ltemp = 8 * (bytes_sent/total_time);

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

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

    } /* end if (total_time) */

          

    /* All done */

    SetDlgItemText(hOurDlg, IDD_COMMENT, "...TCP Shout Done");

    return bytes_sent;

}

 

/* eof */

 

3.4.3.7 tlisten.c清单

/*

 * 文件名:TLISTEN.C

 */

 

#include "wshout.h"

 

/* MSC Include files: */

#include <stdio.h>

#include <io.h>

#include <string.h>

#include <stdlib.h>

#include <time.h>

 

 

/* Returns the number of bytes written */

long TReadData(SOCKET hSock, HWND hOurDlg, int read_len)

{