|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Allows users to download a resource just by its content hash
Field Summary | |
---|---|
string | HDR_DOWNLOAD_URL |
string | HDR_FILENAME |
string | HDR_HASH |
string | HDR_LENGTH |
string | HDR_PART |
string | HDR_PART_LAS |
string | HDR_PARTS |
string | HDR_RANGE_END |
string | HDR_RANGE_START |
string | HDR_SERVER_CONTACTS |
string | HDR_SERVER_NAME |
string | HDR_SERVER_SIMUL |
string | HDR_SERVER_THROTTLE |
string |
HDR_THROTTLE
Throttle for this reply |
string | HDR_URL |
string | HDR_USER |
string | HDR_USER_AGENT |
string | HDR_VERSION |
Fields inherited from class Naanou.ResourceExchange.NaanouContext |
---|
description |
Fields inherited from class ClintHeyer.Httpd.FSContext |
---|
docRoot, mount, readBufferLenSet |
Fields inherited from class ClintHeyer.Httpd.Context |
---|
configuration, contexts, padlock, parent, requiresSession, sessionManager, throttleRate |
Constructor Summary | |
---|---|
NaanouDirectContext(string mount, string docRoot, ClintHeyer.Httpd.Context parent, ClintHeyer.Httpd.Lock padlock) Constructor. Defines a mount point, document root, parent context and a lock |
Properties inherited from class Naanou.ResourceExchange.NaanouContext |
---|
Description, Lister |
Properties inherited from class ClintHeyer.Httpd.FSContext |
---|
DocumentRoot, MountedPoint, Url |
Properties inherited from class ClintHeyer.Httpd.Context |
---|
Lock, Parent, RequiresSession, ServerManager, SessionManager, ThrottleRate, TicketIssuer |
Method Summary | |
---|---|
int | GetReadBufferLen(long throttle) |
void |
Handle(ClintHeyer.Httpd.HttpRequest request, string extraPath) Handle a request |
void | HandleGet(ClintHeyer.Httpd.HttpRequest request, string hash) |
void | HandleHead(ClintHeyer.Httpd.HttpRequest request, string hash) |
int |
LocateTemporaryBlocks(ClintHeyer.Httpd.HttpReply reply, string hash, int blockCount) Locates a resource in the temporary block storage area |
bool |
SendRange(ClintHeyer.Httpd.HttpRequest request, ClintHeyer.Httpd.HttpReply reply, System.IO.Stream stream, long start, long end, int readBufferLen) Sends a byte range |
Methods inherited from class Naanou.ResourceExchange.NaanouContext |
---|
IsValidRequest |
Methods inherited from class ClintHeyer.Httpd.FSContext |
---|
CanHandleRequest, OnThrottleChange, SendFile, SendStream, ToString |
Methods inherited from class ClintHeyer.Httpd.Context |
---|
AddContext, AddResponseHandler, GetContexts, GetMimeType, GetResponseHandler, IConfigurable.Get, IConfigurable.GetBool, IConfigurable.GetFloat, IConfigurable.GetInt, IConfigurable.GetString, LoadConfig, OnReplyCompleted, OnReplyCompletedEvent, OnReplyStarted, OnReplyStartedEvent, OnThrottleChangeEvent, RemoveContext, SaveConfig |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone |
Events inherited from class ClintHeyer.Httpd.Context |
---|
ReplyCompleted, ReplyStarted, ThrottleChange |
Field Detail |
---|
public string HDR_DOWNLOAD_URL
public string HDR_FILENAME
public string HDR_HASH
public string HDR_LENGTH
public string HDR_PART
public string HDR_PART_LAS
public string HDR_PARTS
public string HDR_RANGE_END
public string HDR_RANGE_START
public string HDR_SERVER_CONTACTS
public string HDR_SERVER_NAME
public string HDR_SERVER_SIMUL
public string HDR_SERVER_THROTTLE
public string HDR_THROTTLE
Throttle for this reply
public string HDR_URL
public string HDR_USER
public string HDR_USER_AGENT
public string HDR_VERSION
Constructor Detail |
---|
public NaanouDirectContext(string mount, string docRoot, ClintHeyer.Httpd.Context parent, ClintHeyer.Httpd.Lock padlock)
Constructor. Defines a mount point, document root, parent context and a lock
Parameters:
mount
- Mount pointdocRoot
- Document rootparent
- Parent contextpadlock
- Lock (or null)Method Detail |
---|
private int GetReadBufferLen(long throttle)
public void Handle(ClintHeyer.Httpd.HttpRequest request, string extraPath)
Handle a request
Parameters:
request
- RequestextraPath
- Extra pathClintHeyer.Httpd.ResourceLockedException
- Lockedprivate void HandleGet(ClintHeyer.Httpd.HttpRequest request, string hash)
private void HandleHead(ClintHeyer.Httpd.HttpRequest request, string hash)
private int LocateTemporaryBlocks(ClintHeyer.Httpd.HttpReply reply, string hash, int blockCount)
Locates a resource in the temporary block storage area
Parameters:
reply
- Reply to add part details toohash
- Resource hashblockCount
- Start index fromprivate bool SendRange(ClintHeyer.Httpd.HttpRequest request, ClintHeyer.Httpd.HttpReply reply, System.IO.Stream stream, long start, long end, int readBufferLen)
Sends a byte range
Parameters:
request
- Requestreply
- Replystart
- Start position (normalised to stream)end
- EndreadBufferLen
- Read buffer lengthstream
- Stream to read from
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |