|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Constructor Summary | |
---|---|
Config() Initializes a new instance of the Config class. |
Property Summary | |
---|---|
string[] |
Application
Application file extensions |
string[] |
Archive
Archive file extensions |
string[] |
Audio
Audio file extensions |
int |
BlockStorageMax
Maximum size in megabytes block storage should reach. |
string |
BlockStoragePath
Path for storing blocks, e.g \blocks\. Resolved to absolute path on runtime, Always has trailing slash. |
int |
BlockStorageTimeout
Maximum age of a block (in minutes) before it is considered stale if uncomplete |
string[] |
Document
Document allowable file extensions |
int |
DownloadIdealTime
Gets the number of seconds that a one single block (of variable size, starting at 2^9KB) should transfer in. This affects how big download chunks from hosts are depending on their speed. |
int |
DownloadMaximum
Gets the maximum number of resources that can be downloaded at once. Keep in mind that for each resource, up to DownloadMaxSwarm simultaneous connections will be used to get the resource. |
int |
DownloadMaxSwarm
Total number of simultaneous downloads per resource. This setting also determines the total number of simultaneous uploads available to others from this host. |
int |
DownloadMaxSwarmPerHost
Total number of simultaneous downloads per source |
int |
DownloadWaitTime
Number of seconds to wait inbetween retrying a download |
int |
HostRetryLimit
Number times a host will be retried if it timesout before it is finally given up on |
int |
HostTimeout
Number of seconds to wait for requests/replies to a remote host before it is considered dead |
string[] |
Image
Image file extensions |
bool |
IncludeHidden
Should hidden directories/files be included? |
string[] |
Other
Other allowable file extensions |
string[] |
ServerContacts
Returns server contacts in email, im, web order |
string |
ServerMotd
Server message of the day (maximum 1000 chars) |
string |
ServerName
Server name (maximum 200 chars) |
int |
ServerPort
Port to use for webserver. Set to -1 for a random port |
long |
ServerThrottle
A per-outgoing connection throttle rate (in bytes per second). Set to 0 for no throttling |
string[] |
Video
Video file extensions |
Method Summary | |
---|---|
Naanou.Common.FileCategory |
GetExtensionCategory(string extension) Case-insensitive checks if the extension is valid for indexing |
object | IConfigurationSectionHandler.Create(object parent, object configContext, System.Xml.XmlNode section) |
void | Initialize() |
string |
ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, string defaultValue) Reads string setting |
int |
ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, int defaultValue) Reads int setting |
long |
ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, long defaultValue) Reads long setting |
bool |
ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, bool defaultValue) Reads boolean setting |
string | StripHTML(string text) |
bool |
ValidExtension(string extension) Case-insensitive checks if the extension is valid for indexing |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Field Detail |
---|
private string application
private string APPLICATION
private string[] applicationExt
private string archive
private string ARCHIVE
private string[] archiveExt
private string audio
private string AUDIO
private string[] audioExt
internal System.Version BACK_COMPAT_VERSION
private string BLOCK_STORAGE_MAX
private string BLOCK_STORAGE_PATH
private string BLOCK_STORAGE_TIMEOUT
private int blockStorageMax
private string blockStoragePath
private int blockStorageTimeout
private string document
private string DOCUMENT
private string[] documentExt
private string DOWNLOAD_IDEAL_TIME
private string DOWNLOAD_MAX
private string DOWNLOAD_MAX_SWARM
private string DOWNLOAD_MAX_SWARM_PER_HOST
private string DOWNLOAD_WAIT_TIME
private int downloadIdealTime
private int downloadMaximum
private int downloadMaxSwarm
private int downloadMaxSwarmPerHost
private int downloadWaitTime
private string HOST_RETRY_LIMIT
private string HOST_TIMEOUT
private int hostRetryLimit
private int hostTimeout
private string image
private string IMAGE
private string[] imageExt
private string INCLUDE_HIDDEN
private bool includeHidden
private bool initialized
public int KEY_LIFETIME
How long keys are kept for (mins)
public double KEY_REPUBLISH_RATIO
Ratio multiplied by KEY_LIFETIME gives how long (mins) client will wait until republishing
private string other
private string OTHER
private string[] otherExt
private string SERVER_EMAIL_CONTACT
private string SERVER_IM_CONTACT
private string SERVER_MOTD
private string SERVER_NAME
private string SERVER_PORT
private string SERVER_THROTTLE
private string SERVER_WEB_CONTACT
private string serverEmailContact
private string serverImContact
private string serverMotd
private string serverName
private int serverPort
private long serverThrottle
private string serverWebContact
private System.Collections.Hashtable validExtensions
internal System.Version VERSION
private string video
private string VIDEO
private string[] videoExt
Constructor Detail |
---|
public Config()
Initializes a new instance of the Config class.
Property Detail |
---|
internal string[] Application
Application file extensions
internal string[] Archive
Archive file extensions
internal string[] Audio
Audio file extensions
internal int BlockStorageMax
Maximum size in megabytes block storage should reach.
Minimum 10mb
internal string BlockStoragePath
Path for storing blocks, e.g \blocks\. Resolved to absolute path on runtime, Always has trailing slash.
internal int BlockStorageTimeout
Maximum age of a block (in minutes) before it is considered stale if uncomplete
Minimum 5
internal string[] Document
Document allowable file extensions
internal int DownloadIdealTime
Gets the number of seconds that a one single block (of variable size, starting at 2^9KB) should transfer in. This affects how big download chunks from hosts are depending on their speed.
Minimum 60. Attempts to keep downloads within 30 (Source.DOWNLOAD_IDEAL_TIME_RANGE) seconds of this figure
internal int DownloadMaximum
Gets the maximum number of resources that can be downloaded at once. Keep in mind that for each resource, up to DownloadMaxSwarm simultaneous connections will be used to get the resource.
Minimum 1. This setting, along with DownloadMaxSwarmPerHost determines how many simultaneous connections are available to users getting data from you. The outgoing connection limit is kept to DownloadMaximum * DownloadMaxSwarm. For example, if DownloadMaximum is set to 3 (maximum of 3 files are retrieved at once), and DownloadMaxSwarm is set to 5 (Up to 5 parts of the file will be downloaded at once), upto 15 outgoing connections be allowed.
internal int DownloadMaxSwarm
Total number of simultaneous downloads per resource. This setting also determines the total number of simultaneous uploads available to others from this host.
Minimum 1
internal int DownloadMaxSwarmPerHost
Total number of simultaneous downloads per source
Minimum 1.
internal int DownloadWaitTime
Number of seconds to wait inbetween retrying a download
Minimum 5
internal int HostRetryLimit
Number times a host will be retried if it timesout before it is finally given up on
internal int HostTimeout
Number of seconds to wait for requests/replies to a remote host before it is considered dead
Minimum 1
internal string[] Image
Image file extensions
internal bool IncludeHidden
Should hidden directories/files be included?
internal string[] Other
Other allowable file extensions
internal string[] ServerContacts
Returns server contacts in email, im, web order
internal string ServerMotd
Server message of the day (maximum 1000 chars)
public string ServerName
Server name (maximum 200 chars)
internal int ServerPort
Port to use for webserver. Set to -1 for a random port
internal long ServerThrottle
A per-outgoing connection throttle rate (in bytes per second). Set to 0 for no throttling
Minimum 3KB/s (3072)
internal string[] Video
Video file extensions
Method Detail |
---|
internal Naanou.Common.FileCategory GetExtensionCategory(string extension)
Case-insensitive checks if the extension is valid for indexing
Parameters:
extension
- private object IConfigurationSectionHandler.Create(object parent, object configContext, System.Xml.XmlNode section)
private void Initialize()
internal string ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, string defaultValue)
Reads string setting
Parameters:
settings
- Settingskey
- KeydefaultValue
- Default valueinternal int ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, int defaultValue)
Reads int setting
Parameters:
settings
- Settingskey
- KeydefaultValue
- Default valueinternal long ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, long defaultValue)
Reads long setting
Parameters:
settings
- Settingskey
- KeydefaultValue
- Default valueinternal bool ReadSetting(System.Collections.Specialized.NameValueCollection settings, string key, bool defaultValue)
Reads boolean setting
Parameters:
settings
- Settingskey
- KeydefaultValue
- Default valueinternal string StripHTML(string text)
internal bool ValidExtension(string extension)
Case-insensitive checks if the extension is valid for indexing
Parameters:
extension
-
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |