Class TransportService
- Namespace
- NLightning.Bolts.BOLT8.Services
- Assembly
- NLightning.Bolts.dll
public sealed class TransportService : ITransportService, IDisposable
- Inheritance
-
TransportService
- Implements
- Inherited Members
Constructors
TransportService(bool, ReadOnlySpan<byte>, ReadOnlySpan<byte>, TcpClient)
public TransportService(bool isInitiator, ReadOnlySpan<byte> s, ReadOnlySpan<byte> rs, TcpClient tcpClient)
Parameters
isInitiator
bools
ReadOnlySpan<byte>rs
ReadOnlySpan<byte>tcpClient
TcpClient
Properties
IsConnected
public bool IsConnected { get; }
Property Value
IsInitiator
public bool IsInitiator { get; }
Property Value
RemoteStaticPublicKey
public PubKey RemoteStaticPublicKey { get; }
Property Value
- PubKey
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
~TransportService()
protected ~TransportService()
InitializeAsync(TimeSpan)
public Task InitializeAsync(TimeSpan networkTimeout)
Parameters
networkTimeout
TimeSpan
Returns
WriteMessageAsync(IMessage, CancellationToken)
public Task WriteMessageAsync(IMessage message, CancellationToken cancellationToken = default)
Parameters
message
IMessagecancellationToken
CancellationToken
Returns
Events
MessageReceived
public event EventHandler<MemoryStream>? MessageReceived