在哪里可以获得可以与Microsoft的TransmitFile函数一起使用的ReceiveFile例程? [英] Where can I get a ReceiveFile routine that can work with microsoft's TransmitFile function?

查看:100
本文介绍了在哪里可以获得可以与Microsoft的TransmitFile函数一起使用的ReceiveFile例程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以获得可以与Microsoft的TransmitFile函数一起使用的ReceiveFile例程?我正在编写一个客户端/服务器Windows程序,需要将大量文件从客户端移动到服务器,反之亦然.我决定使用sendfile函数,但是找不到相应的ReceiveFrom函数.请在哪里可以获得可以与sendFile函数一起使用的例程.即在哪里可以获取自定义的ReceiveFile功能.

Where can I get a ReceiveFile routine that can work with microsoft''s TransmitFile function? I am writing a client/server windows program and will need to move files aroud from client to server and vice versa. I decided to use transmitfile function but could not find a corresponding ReceiveFrom function. Please where can I get a routine that can work with transmitFile function. i.e. where can I get a custom ReceiveFile funsction.

推荐答案

您可能必须编写它.

此功能只是将文件的内容转储到套接字.
它本身并不是一个完整的API.

您仍然需要编写自己的协议来处理传输.
You''ll probably have to write it.

This function just dumps the contents of the file to the socket.
It''s not a complete API on it''s own.

You''ll still need to write your own protocol to handle the transfer.


据我所知,这还没有.该函数仅将数据写入其句柄已知的远程套接字.假定插座已连接.也就是说,您需要在两侧编写通信部分并建立连接.另一部分应连接到您的套接字,并能够顺序读取所有数据块并对其执行某些操作,例如,基于此数据创建一个新文件.有关更多详细信息,请尝试查找一些与ReceiveFile不相关的通信示例:
http://bit.ly/LJXFk7 [ ^ ].

—SA
There is no such thing, to best of my knowledge. The function simply writes data to a remote socked known by its handle. It assumes the sockets are already connected. That said, you need to write communication part on both sides and establish connection. The other part should be connected to your socket, and able to read all data blocks sequentially and do something about it, for example, create a new file based on this data. For more detail, try to find some communication sample not related to ReceiveFile:
http://bit.ly/LJXFk7[^].

—SA


这篇关于在哪里可以获得可以与Microsoft的TransmitFile函数一起使用的ReceiveFile例程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆