Taste FastDFS ~ Second, use of the FastDFS Client

Source: Internet
Author: User

The FastDFS client can help us easily connect to the DFS server and send encapsulated SOCKET commands to the server. DFS only provides the server in the linux environment, but does not support WINDOWS. net, you can choose C # FastDFS client, you can complete it according to your own needs.

My Transformation:

For ease of calling, I put the work connected to tracker on the DFS client and assigned it a default group.

    Constructors         List<IPEndPoint> trackerIPs =  List<IPEndPoint>                   =  List<IPEndPoint>= =

For the start user, you can complete the upload, download, and other operations during the call, and check the Code:

                                    [] content = =  FileStream( (BinaryReader reader = = reader.ReadBytes(( fileName = FastDFSClient.UploadFile(FastDFSClient.DefaultGroup, content, 

Below I will disclose the source code of the FastDFSClient class. After reading the code, I will discuss the problem and solve it together.

            Constructors         List<IPEndPoint> trackerIPs =  List<IPEndPoint>                   =  List<IPEndPoint>= =                                              StorageNode GetStorageNode(== = = ===                                                         UploadFile(StorageNode storageNode, [] contentByte, ==                                                                            UploadSlaveFile( groupName, [] contentByte,  master_filename,  prefix_name, == = ==                                                          UploadAppenderFile(StorageNode storageNode, [] contentByte, ==                                                 AppendFile( groupName,  fileName, == = =                                       RemoveFile( groupName, == = =                                               [] DownloadFile(StorageNode storageNode, = DOWNLOAD_FILE.Instance.GetRequest(storageNode.EndPoint, , =                                                                  [] DownloadFile(StorageNode storageNode,  fileName,  offset, ==                                                FDFSFileInfo GetFileInfo(StorageNode storageNode, == 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.