如何在winsock2中编写TransmitPackets函数?
我正在使用 UDP 在 VC++(服务器)中编写文件传输应用程序。我在winsock2中了解到,有一些在文件传输中很有用的函数。任何人都可以帮助我吗?我也在寻找winsock2 的TransmitPackets 示例应用程序,但不是gettng。请帮我。谢谢。
I'm writing a file transfer application in VC++(Server) using UDP. I came to know in winsock2, there are some functions which are useful in file transfer. Can anybody help me. I'm also looking for a sample application of TransmitPackets of winsock2 but not gettng. Please help me. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
http://www.mycplus.com /source-code/c-source-code/udp-sender-and-receiver/
http://www.winsocketdotnetworkprogramming.com/winsock2programming/winsock2advancedcode1e.html
http://msdn.microsoft.com/en-us/library/ms740566%28VS.85%29.aspx
这里是示例应用程序和源代码,可以帮助您。
编辑:
以下是发送方函数,它接受字符串、字符串大小、IP 和端口并通过 UDP 发送数据包。
下面是UDP的接收函数。
http://www.mycplus.com/source-code/c-source-code/udp-sender-and-receiver/
http://www.winsocketdotnetworkprogramming.com/winsock2programming/winsock2advancedcode1e.html
http://msdn.microsoft.com/en-us/library/ms740566%28VS.85%29.aspx
Here is the sample application and source code which will help you.
edited:
Following is the sender function which take string, size of string, IP and Port and send packets over UDP.
Following is the receiver function of UDP.
这解释了它:
http://msdn.microsoft.com/en-我们/库/ms740566%28VS.85%29.aspx
This explains it:
http://msdn.microsoft.com/en-us/library/ms740566%28VS.85%29.aspx