As required by the project, write a large file transfer service prototype based on WCF. I think it has some reference value, so I will share it online.
The current version V1.1 has the following features:
1. The file transfer port is 18650.
2. upload and download files
3. Supports obtaining the file transmission status (not started, in transmission, transfer completed, and error)
4. Support obtaining File Transfer Progress (range: 0 ~ 1)
5. Supports obtaining the file transmission speed (automatically switch between kb/s and MB/s Display Based on the file transmission speed)
The project solution is as follows:
The service disconnection includes the console service and Windows Service of the WCF host and the core of the file transfer service.
The public includes some help classes (file hash verification, encapsulation of the Progress Stream)
The client includes the proxy and demo program wpfdemo that encapsulates the file transfer logic.
Running Effect
The server and client are directly connected (M Adaptive), so the above speed reaches 40 MB/s.
Code download
Http://files.cnblogs.com/Aphasia/%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E6%9C%8D%E5%8A%A1.rar
WCF File Transfer Service