Property | Type | Description | |
---|---|---|---|
CheckForChunkDataCacheTimeouts | void | ||
DFS | System | ||
DFSConnectionShutdown | void | ||
ElapsedTimerWorker | void | ||
IncomingChunkAvailabilityRequest | void | ||
IncomingChunkInterestReplyData | void | ||
IncomingChunkInterestReplyInfo | void | ||
IncomingChunkInterestRequest | void | ||
IncomingItemRemovalUpdate | void | ||
IncomingLocalItemBuild | void | ||
IncomingPeerChunkAvailabilityUpdate | void | ||
IncomingRemoteItemLinkRequest | void | ||
KnownPeersRequest | void | ||
KnownPeersUpdate | void | ||
LinkModeWorker | void | ||
LoadAllowedDisallowedPeerIPs | void | ||
RequestLocalItemBuilds | void |
Method | Description | |
---|---|---|
AddItem ( DistributedItem itemToAdd ) : DistributedItem |
Adds a distributed item to the local cache and informs any known peers of the item availability
|
|
AllLocalDFSItemKeys ( bool completeItemsOnly = true ) : string[] |
Returns all item MD5 checksums for DFS items
|
|
AllLocalDFSItemsWithBuildTime ( bool completeItemsOnly = true ) : DateTime>.Dictionary |
Returns a dictionary of DFS items along with corresponding ItemBuildCompleted times
|
|
CheckForSharedItems ( string peerIP, int peerPort ) : void |
Communicates with the provided peer to see if any item swarms can be linked. This is a single link event, possibly use InitialiseDFSLink() for a maintained link.
|
|
CloseConnectionToCompletedPeers ( ) : void |
Closes all connections to peers who have completed items
|
|
DisableLogging ( ) : void |
Disable logging in networkComms
|
|
EnableLogging ( ILogger logger ) : void |
Enable logging in networkComms using the provided logging adaptor
|
|
GetDistributedItemByChecksum ( string itemCheckSum ) : DistributedItem |
Returns the distributed item with a matching itemCheckSum. Returns null if item is not found.
|
|
GetDistributedItemByIdentifier ( string itemIdentifier ) : DistributedItem |
Returns the distributed item with a matching itemIdentifier. Returns null if item is not found.
|
|
Initialise ( int initialPort, bool rangeRandomPortFailover = true ) : void |
Initialises the DFS
|
|
InitialiseDFSLink ( string linkTargetIP, int linkTargetPort, DFSLinkMode linkMode ) : void |
Initialises this DFS peer to repeat all items available on the linkTargetIP
|
|
ItemAlreadyInLocalCache ( DistributedItem item ) : bool |
Returns true if the provided item is already present within the swarm
|
|
ItemAlreadyInLocalCache ( string itemCheckSum ) : bool |
Returns true if an item with a matching itemCheckSum is present within the local cache
|
|
MostRecentlyCompletedItem ( ) : DistributedItem |
Returns the most recently completed item in the DFS. Returns null if there are no DFS items.
|
|
PushItemToPeer ( Connection peerConnection, DistributedItem itemToDistribute, string completedPacketType ) : void |
Introduces a new item into the swarm and sends a build command to the originating requester
|
|
RemoveAllItemsFromLocalOnly ( bool broadcastRemoval = false ) : void |
Removes all items from local only
|
|
RemoveAllItemsFromLocalOnly ( string ItemTypeStr, bool broadcastRemoval = false ) : void |
Remove any items from the DFS with a matching itemTypeStr
|
|
RemoveItem ( string itemCheckSum, bool broadcastRemoval = true, bool removeSwarmWide = false ) : void |
Remove an item from the DFS. Possibly swarmWide and with or without a removal broadcast
|
|
Shutdown ( ) : void |
Shutdown the DFS. All local DFS items are deleted.
|
Method | Description | |
---|---|---|
CheckForChunkDataCacheTimeouts ( ) : void |
Flick through the chunk data cache and remove any items that have timed out
|
|
DFS ( ) : System | ||
DFSConnectionShutdown ( Connection connection ) : void |
If a connection is disconnected we want to make sure we handle it within the DFS
|
|
ElapsedTimerWorker ( ) : void |
Runs in the background to estimate the elapsed time of the application. We can't use DateTime as elapsed time should not include time during which process was suspended
|
|
IncomingChunkAvailabilityRequest ( |
UDP - A remote peer is requesting chunk availability for this local peer
|
|
IncomingChunkInterestReplyData ( |
TCP - Received when a peer sends us the data portion of a chunk possibly following a request
|
|
IncomingChunkInterestReplyInfo ( |
UDP and TCP - Received when a peer sends us a chunk data information possibly following a request
|
|
IncomingChunkInterestRequest ( |
UDP - Received when a peer request a chunk
|
|
IncomingItemRemovalUpdate ( |
UDP - A remote peer is informing us that they no longer have an item
|
|
IncomingLocalItemBuild ( PacketHeader packetHeader, Connection connection, ItemAssemblyConfig assemblyConfig ) : void |
TCP - Received by this DFS if a server is telling this instance to build a local file
|
|
IncomingPeerChunkAvailabilityUpdate ( PacketHeader packetHeader, Connection connection, PeerChunkAvailabilityUpdate updateDetails ) : void |
UDP - A remote peer is announcing that it has an updated availability of chunks
|
|
IncomingRemoteItemLinkRequest ( PacketHeader packetHeader, Connection connection, DFSLinkRequest linkRequestData ) : void |
TCP - A remote peer is trying to link DFS items
|
|
KnownPeersRequest ( PacketHeader packetHeader, Connection connection, string itemCheckSum ) : void |
UDP - Used by a client when requesting a list of known peers
|
|
KnownPeersUpdate ( PacketHeader packetHeader, Connection connection, KnownPeerEndPoints peerList ) : void |
UDP - The response to a DFS_KnownPeersRequest
|
|
LinkModeWorker ( ) : void |
Background worker thread which maintains the link depending on the selected link mode
|
|
LoadAllowedDisallowedPeerIPs ( ) : void | ||
RequestLocalItemBuilds ( PacketHeader packetHeader, Connection connection, string itemCheckSums ) : void |
TCP - A remote peer has request a push of the provided itemCheckSums. This method is used primarily when in repeater mode
|
public static AddItem ( DistributedItem itemToAdd ) : DistributedItem | ||
itemToAdd | DistributedItem | The item to add |
return | DistributedItem |
public static AllLocalDFSItemKeys ( bool completeItemsOnly = true ) : string[] | ||
completeItemsOnly | bool | If true only returns checksums for completed items |
return | string[] |
public static AllLocalDFSItemsWithBuildTime ( bool completeItemsOnly = true ) : DateTime>.Dictionary |
||
completeItemsOnly | bool | If true only returns information for completed items |
return | DateTime>.Dictionary |
public static CheckForSharedItems ( string peerIP, int peerPort ) : void | ||
peerIP | string | The IPAddress of the peer |
peerPort | int | The port of the peer |
return | void |
public static CloseConnectionToCompletedPeers ( ) : void | ||
return | void |
public static EnableLogging ( ILogger logger ) : void | ||
logger | ILogger | |
return | void |
public static GetDistributedItemByChecksum ( string itemCheckSum ) : DistributedItem | ||
itemCheckSum | string | The item MD5 checksum to match |
return | DistributedItem |
public static GetDistributedItemByIdentifier ( string itemIdentifier ) : DistributedItem | ||
itemIdentifier | string | The item identifier to match |
return | DistributedItem |
public static Initialise ( int initialPort, bool rangeRandomPortFailover = true ) : void | ||
initialPort | int | The local listen port to use |
rangeRandomPortFailover | bool | True if a random port should be select if the initialPort is unavailable |
return | void |
public static InitialiseDFSLink ( string linkTargetIP, int linkTargetPort, DFSLinkMode linkMode ) : void | ||
linkTargetIP | string | The IPAddress corresponding with the link seed |
linkTargetPort | int | The port corresponding with the link seed |
linkMode | DFSLinkMode | The link mode to be used |
return | void |
public static ItemAlreadyInLocalCache ( DistributedItem item ) : bool | ||
item | DistributedItem | The relevant DFS item |
return | bool |
public static ItemAlreadyInLocalCache ( string itemCheckSum ) : bool | ||
itemCheckSum | string | The relevant item MD5 checksum |
return | bool |
public static MostRecentlyCompletedItem ( ) : DistributedItem | ||
return | DistributedItem |
public static PushItemToPeer ( Connection peerConnection, DistributedItem itemToDistribute, string completedPacketType ) : void | ||
peerConnection | Connection | The peer which requested the DFS item |
itemToDistribute | DistributedItem | The item to be distributed |
completedPacketType | string | The packet type to use once the item has been fully assembled |
return | void |
public static RemoveAllItemsFromLocalOnly ( bool broadcastRemoval = false ) : void | ||
broadcastRemoval | bool | If true all peers will be notified that we are removing all items. |
return | void |
public static RemoveAllItemsFromLocalOnly ( string ItemTypeStr, bool broadcastRemoval = false ) : void | ||
ItemTypeStr | string | The item type string to match |
broadcastRemoval | bool | If true all peers will be notified that we are removing matching items. |
return | void |
public static RemoveItem ( string itemCheckSum, bool broadcastRemoval = true, bool removeSwarmWide = false ) : void | ||
itemCheckSum | string | The checksum corresponding with the item to remove |
broadcastRemoval | bool | If true all peers will be notified that we are removing this item. |
removeSwarmWide | bool | True if this item should be removed swarm wide |
return | void |