The SwarmChunkAvailability type exposes the following members.
Back to Top
Back to Top
Creates a new instance of SwarmChunkAvailability
Adds or updates a peer to the local availability list. Useful for when a peer informs us of an updated availability.
Returns an array containing all known peer endpoints in the format locaIP:port
Returns an array containing the network identifiers of every peer in this swarm
Broadcast to all known peers that the local DFS is removing the specified item.
Updates all peers in the swarm that we have updated a chunk
Builds a dictionary of chunk availability throughout the current swarm for chunks we don't have locally. Keys are chunkIndex, peer network identifier, and peer total chunk count
Metric used to determine the health of a chunk and whether swarm will benefit from a broadcasted update. A value greater than 1 signifies a healthy chunk availability.
Clear all chunk availability flags for the local peer
Closes established connections with completed peers as they are now redundant.
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as a hash function for a particular type.(Inherited from Object.)
Returns the new timeout count value after incrementing the timeout count for the provided peer IPEndPoint.
Gets the Type of the current instance.(Inherited from Object.)
Get the provided peer IPEndPoint busy status
Get the provided peer IPEndPoint online status
Creates a shallow copy of the current Object.(Inherited from Object.)
The number of complete peers in this swarm.
The number of peers in this swarm
Returns the chunk flag availability of the requested peer.
Single method for determining if contact can be made with the request peer. Prevents loop back contact via matching identifier and currentLocalListenEndPoints. Finally uses the DFS.AllowedPeerIPS and DFS.DisallowedPeerIPS if set.
Returns true if a peer with the provided IPEndPoint exists in the swarm
Returns true if a peer with the provided networkIdentifier exists in this SwarmChunkAvailability
Returns true if the specified peer has the specified chunkIndex.
Returns true if a peer has a complete copy of the DFS item
Returns true if the specified peer is a super peer
Records a chunk as available for the local peer
Removes any peers which have the same endPoint as the provided currentActivePeerEndPoint except one with matching currentActivePeerIdentifier
Deletes knowledge of a peer IPEndPoint from our local swarm chunk availability. If peerEndPoint.Address is IPAddress.Any then the entire peer will be deleted.
Set the provided peer IPEndPoint busy status to busy
Set the provided peer IPEndPoint as offline
Sets our local availability
Serialise this swarm chunk availability in a thread safe manner
Returns a string that represents the current object.(Inherited from Object.)
Update the chunk availability by contacting all existing peers. If a cascade depth greater than 1 is provided will also contact each peers peers.