-
局域网文件传输
为了设计统一和用户操作方便,我们希望将服务端与客户端融合在一起,形成一个程序,这样用户理解起来,更加直观一点(其实这样做也是为了方便调试,大...
局域网文件传输
为了设计统一和用户操作方便,我们希望将服务端与客户端融合在一起,形成一个程序,这样用户理解起来,更加直观一点(其实这样做也是为了方便调试,大家可以在本机上测试,自己传文件给自己)。所以,我们在程序中需要使用两个Winsock控件,一个负责监听,一个负责发送,当发送端连接成功以后,便选择一个待发送的文件(可以是任意二进制文件),接着将文件名和文件字节长度发送给接收端,接收端收到这个消息以后,将文件名和文件长度解析出来,然后通知发送端可以开始发送文件;发送端读到这个消息之后,将文件流以字节的形式发送到接收端,接收端收到后,将二进制流回写,保存成文件即可。这里要注意两点,一个是由于Winsock每次最大传输8K的内容,所以需要将文件分解,每次传输固定数目的字节流,这样发送和接收时都可以根据这个数目来判断文件传输的进程,一旦字节流数目等于文件的大小,就需要关闭相应的文件句柄;另一点是由于我只使用一个Winsock控件接收,接收文本时需要注意要将UNICODE转码,解析成可识别的信息。
-LAN file transfer to uniform design and user convenience, we hope it will end service and client together and form a process so that users understand, a more intuitive 1:00 (in fact, do so in order to facilitate debugging, you can test the machine, its own text- items for himself). Therefore, we need procedures in the use of two Winsock Control, a charge of wiretapping, a charge of this, when the transmitter connects successfully, it will be a choice to send the document (can be arbitrary binary files), will then file names and the
- 2022-04-14 22:25:12下载
- 积分:1
-
windows mobile中操作outlook,可打开outlook,把信件写入草稿箱和发件箱。...
windows mobile中操作outlook,可打开outlook,把信件写入草稿箱和发件箱。-windows mobile operating outlook which can be opened Outlook. write a letter and copies of Trash bins.
- 2022-03-17 14:34:48下载
- 积分:1
-
Access to the basic hardware information, VC++ under development, the test can b...
获取系统的硬件的基本信息,VC++下开发,测试通过,可以运行-Access to the basic hardware information, VC++ under development, the test can be run
- 2023-01-23 15:50:03下载
- 积分:1
-
用c#编写的一个简单的万年历查询器,只能查询每个月的一号。无图形输出,那位仁兄有意可以加一个。运行平台为asp.net+iis....
用c#编写的一个简单的万年历查询器,只能查询每个月的一号。无图形输出,那位仁兄有意可以加一个。运行平台为asp.net+iis.-a simple perpetual calendar inquirier developed with c#,it can only query the first day of each month. there is no graphic output, and I hope someone could add it. running platform is asp.net+iis.
- 2022-05-16 08:56:06下载
- 积分:1
-
VB to read and write registry download !!!!! we try,
VB读写注册表!!!!!大家下载试试,-VB to read and write registry download !!!!! we try,
- 2023-07-22 23:15:02下载
- 积分:1
-
用C语言编写时分秒计数器,能够计时到23小时59分59秒
用C语言编写时分秒计数器,能够计时到23小时59分59秒-realize an arithmometer by using C programming
- 2023-04-30 05:55:03下载
- 积分:1
-
ASP.NETWebService
ASP.NETWebService
- 2022-05-24 16:49:05下载
- 积分:1
-
c#下的vs2005+windowsmobile 5.0 的rss浏览程序
c#下的vs2005+windowsmobile 5.0 的rss浏览程序-c# under vs2005+ windowsmobile 5.0 of the browser program rss
- 2022-01-24 14:57:49下载
- 积分:1
-
Tk written with a calculator specifically used to calculate overtime hours per w...
用tk写的一个计算器,专门用来计算加班族每周的加班时间-Tk written with a calculator specifically used to calculate overtime hours per week overtime tribe
- 2022-01-25 19:44:26下载
- 积分:1
-
有两副牌,从每副中任意抽5张牌进行博弈,显示抽取的牌后会显示每副牌的等级,按下按钮进行比较...
有两副牌,从每副中任意抽5张牌进行博弈,显示抽取的牌后会显示每副牌的等级,按下按钮进行比较-There are two sets of cards, drawn at random from each deputy to conduct five card game, showing extraction of each of the plates will show the level of vice cards, press the button to compare
- 2022-07-22 12:58:35下载
- 积分:1