C# Class BitSharp.Network.Messaging

Mostrar archivo Open project: pmlyon/BitSharp Class Usage Examples

Public Properties

Property Type Description
MAGIC_COMPARISON_TOOL System.UInt32
MAGIC_MAIN System.UInt32
MAGIC_TESTNET3 System.UInt32
PROTOCOL_VERSION System.UInt32
SERVICES_BITFIELD System.UInt64
USER_AGENT string

Public Methods

Method Description
BytesToIPAddress ( byte bytes ) : IPAddress
CalculatePayloadChecksum ( byte payload ) : UInt32
ConstructGetBlocksPayload ( ImmutableArray blockLocatorHashes, UInt256 hashStop ) : BitSharp.Network.GetBlocksPayload
ConstructInventoryPayload ( ImmutableArray invVectors ) : BitSharp.Network.InventoryPayload
ConstructMessage ( string command, byte payload ) : BitSharp.Network.Message
ConstructNetworkAddress ( IPAddress ip, int port ) : BitSharp.Network.NetworkAddress
ConstructNetworkAddressWithTime ( DateTimeOffset time, IPAddress ip, int port ) : BitSharp.Network.NetworkAddressWithTime
ConstructVersionPayload ( IPEndPoint localEndPoint, IPEndPoint remoteEndPoint, System.UInt64 nodeId, UInt32 startBlockHeight ) : BitSharp.Network.VersionPayload
GetExternalIPAddress ( ) : IPAddress
GetExternalIPEndPoint ( ) : IPEndPoint
IPAddressToBytes ( IPAddress ipAddress ) : byte[]
VerifyPayloadChecksum ( UInt32 checksum, byte payload ) : bool

Method Details

BytesToIPAddress() public static method

public static BytesToIPAddress ( byte bytes ) : IPAddress
bytes byte
return System.Net.IPAddress

CalculatePayloadChecksum() public static method

public static CalculatePayloadChecksum ( byte payload ) : UInt32
payload byte
return System.UInt32

ConstructGetBlocksPayload() public static method

public static ConstructGetBlocksPayload ( ImmutableArray blockLocatorHashes, UInt256 hashStop ) : BitSharp.Network.GetBlocksPayload
blockLocatorHashes ImmutableArray
hashStop UInt256
return BitSharp.Network.GetBlocksPayload

ConstructInventoryPayload() public static method

public static ConstructInventoryPayload ( ImmutableArray invVectors ) : BitSharp.Network.InventoryPayload
invVectors ImmutableArray
return BitSharp.Network.InventoryPayload

ConstructMessage() public static method

public static ConstructMessage ( string command, byte payload ) : BitSharp.Network.Message
command string
payload byte
return BitSharp.Network.Message

ConstructNetworkAddress() public static method

public static ConstructNetworkAddress ( IPAddress ip, int port ) : BitSharp.Network.NetworkAddress
ip System.Net.IPAddress
port int
return BitSharp.Network.NetworkAddress

ConstructNetworkAddressWithTime() public static method

public static ConstructNetworkAddressWithTime ( DateTimeOffset time, IPAddress ip, int port ) : BitSharp.Network.NetworkAddressWithTime
time DateTimeOffset
ip System.Net.IPAddress
port int
return BitSharp.Network.NetworkAddressWithTime

ConstructVersionPayload() public static method

public static ConstructVersionPayload ( IPEndPoint localEndPoint, IPEndPoint remoteEndPoint, System.UInt64 nodeId, UInt32 startBlockHeight ) : BitSharp.Network.VersionPayload
localEndPoint System.Net.IPEndPoint
remoteEndPoint System.Net.IPEndPoint
nodeId System.UInt64
startBlockHeight System.UInt32
return BitSharp.Network.VersionPayload

GetExternalIPAddress() public static method

public static GetExternalIPAddress ( ) : IPAddress
return System.Net.IPAddress

GetExternalIPEndPoint() public static method

public static GetExternalIPEndPoint ( ) : IPEndPoint
return System.Net.IPEndPoint

IPAddressToBytes() public static method

public static IPAddressToBytes ( IPAddress ipAddress ) : byte[]
ipAddress System.Net.IPAddress
return byte[]

VerifyPayloadChecksum() public static method

public static VerifyPayloadChecksum ( UInt32 checksum, byte payload ) : bool
checksum System.UInt32
payload byte
return bool

Property Details

MAGIC_COMPARISON_TOOL public_oe static_oe property

public static UInt32,System MAGIC_COMPARISON_TOOL
return System.UInt32

MAGIC_MAIN public_oe static_oe property

public static UInt32,System MAGIC_MAIN
return System.UInt32

MAGIC_TESTNET3 public_oe static_oe property

public static UInt32,System MAGIC_TESTNET3
return System.UInt32

PROTOCOL_VERSION public_oe static_oe property

public static UInt32,System PROTOCOL_VERSION
return System.UInt32

SERVICES_BITFIELD public_oe static_oe property

public static UInt64,System SERVICES_BITFIELD
return System.UInt64

USER_AGENT public_oe static_oe property

public static string USER_AGENT
return string