Recently, the company transformed the file system. Thanks to previous work experience, it chose MogileFS.
I found two versions of client APIs on the Internet, but after reading the code, I found that no connection pool is supported. So I encapsulated an API that supports the connection pool on the basis of the original API.
Because it is written based on the ADO. NET mechanism, you must provide a database connection string similar to the following format when writing interfaces:
Code
<? Xml version = "1.0" encoding = "UTF-8"?>
<Configuration>
<ConnectionStrings>
<! -- A complete MogileFS connection string -->
<Add
Name = "MogileFS"
ConnectionString = "host = 192.168.33.2; port = 6001; pooling = true; connection timeout = 100; Connection Lifetime = 150; domain = test;"/>
</ConnectionStrings>
</Configuration>
"MogileFS" is the default configuration node name.
In configuration, except host and domain are required, they are optional.
Source code: Maocos.IO.rar (this code can be freely spread and modified, but please keep the copyright statement)