Class TlvStream
- Namespace
- NLightning.Common.Types
- Assembly
- NLightning.Common.dll
A series of (possibly zero) TLVs
public sealed class TlvStream
- Inheritance
-
TlvStream
- Inherited Members
Methods
Add(Tlv)
Add a TLV to the stream
public void Add(Tlv tlv)
Parameters
tlv
TlvThe TLV to add
Add(params Tlv?[])
Add a series of TLV to the stream
public void Add(params Tlv?[] tlvs)
Parameters
tlvs
Tlv[]The TLVs to add
Any()
Check if any TLVs are present
public bool Any()
Returns
DeserializeAsync(Stream)
Deserialize a TLV stream
public static Task<TlvStream?> DeserializeAsync(Stream stream)
Parameters
stream
StreamThe stream to use
Returns
Exceptions
- SerializationException
Error deserializing TLVStream or any of it's TLVs
GetTlvs()
Get all TLVs in the stream
public IEnumerable<Tlv> GetTlvs()
Returns
SerializeAsync(Stream)
Serialize the TLV stream
public Task SerializeAsync(Stream stream)
Parameters
stream
Stream
Returns
TryGetTlv(BigSize, out Tlv?)
Get a specific TLV from the stream
public bool TryGetTlv(BigSize type, out Tlv? tlv)