You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. DistributionHandler no longer responsible for storing independent list of trusted peers for data exchange, this will now be solely handled by peer channel IsTrustedPeer and PeerNetwork trust policy. Internal GET accessor changed to use LINQ to get trusted peers from ActivePeerChannels.
2. DistributionHandler slightly refactored to use memory mapped files. MemoryEntry struct simplified to be stored in dictionary.
3. New DataPayloadFormat 'MiscData' that will be stored as simple Object in MemoryEntry
4. Clarifying documentation for the DataPayloadFormat structt in DataTransmissionPacket
5. Removing default fill in `ping` behavior built into PeerChannel. Handling of trusting peers has been delegated to public delegate `DefaultTrustProtocol` which runs based on value set in IncomingPeerTrustPolicy.RunDefaultTrustProtocol. Default implementation mimics the basic `ping` behavior but will allow for more advanced logic to be implemented by overriding delegate value
6. Added BlockedIP and BlockedIdentifiers lists to IncomingPeerTrustPolicy. Default DiscernPeerChannels routine now checks these lists along with inbound peer acceptance
Copy file name to clipboardexpand all lines: P2PNet/Distribution/DistributionProtocol.cs
+9-1
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,11 @@ public enum PacketType
47
47
PureMessage,
48
48
BADPACKET
49
49
}
50
+
/// <summary>
51
+
/// Wraps the packet data with the appropriate tags for transmission through the network. This helps the receiving peer identify the packet type and data.
52
+
/// </summary>
53
+
/// <param name="packetType">The type of packet being readied for transmissiion through the network.</param>
54
+
/// <param name="data">This should be the JSON serialized string of the packet before transmission.</param>
/// Removes the <see cref="DataFormatTagMap"/> tags that are placed in the byte[] payload of the <see cref="DataTransmissionPacket"/>.
78
+
/// Removes the <see cref="DistributionProtocol.DataFormatTagMap"/> tags that are placed in the byte[] payload of the <see cref="DataTransmissionPacket"/>.
72
79
/// These tags are automatically placed upon instantiation in the constructor to help identify and handle the payload throughout its lifecycle.
80
+
/// It is necessary to unwrap the data before processing it, which should be primarily done in the <see cref="DistributionHandler"/>
0 commit comments