Table of Contents

Class TransportServiceFactory

Namespace
NLightning.Infrastructure.Transport.Factories
Assembly
NLightning.Infrastructure.dll

Factory for creating a transport service.

public sealed class TransportServiceFactory : ITransportServiceFactory
Inheritance
TransportServiceFactory
Implements
Inherited Members

Remarks

This class is used to create a transport service in test environments.

Constructors

TransportServiceFactory(IEcdh, ILoggerFactory, IMessageSerializer, IOptions<NodeOptions>)

public TransportServiceFactory(IEcdh ecdh, ILoggerFactory loggerFactory, IMessageSerializer messageSerializer, IOptions<NodeOptions> nodeOptions)

Parameters

ecdh IEcdh
loggerFactory ILoggerFactory
messageSerializer IMessageSerializer
nodeOptions IOptions<NodeOptions>

Methods

CreateTransportService(bool, ReadOnlySpan<byte>, ReadOnlySpan<byte>, TcpClient)

Creates a transport service.

public ITransportService CreateTransportService(bool isInitiator, ReadOnlySpan<byte> s, ReadOnlySpan<byte> rs, TcpClient tcpClient)

Parameters

isInitiator bool
s ReadOnlySpan<byte>
rs ReadOnlySpan<byte>
tcpClient TcpClient

Returns

ITransportService