Table of Contents

Class TcpServerModule

Namespace
Loehnert.Lisrt.Communication.Tcp
Assembly
Loehnert.Lisrt.Communication.dll

Represents a LisRT TCP server module for a single client connection.

public class TcpServerModule : CommunicationBase, ICommunication, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged, IHasServiceView, IDisposable
Inheritance
PropertyChangedBase
TcpServerModule
Implements
INotifyPropertyChangedEx
Inherited Members
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Remarks

A connection is closed when another client connects.

Constructors

TcpServerModule(string)

Initializes a new instance of the TcpServerModule class.

public TcpServerModule(string moduleName)

Parameters

moduleName string

The name for the module.

Properties

Icon

Gets an icon which is representative for the module.

public override Uri Icon { get; }

Property Value

Uri

IsConnected

Gets a value indicating whether a client is connected.

public override bool IsConnected { get; }

Property Value

bool

Port

Gets or sets the incoming port.

[Configuration(0, Description = "Port for TCP connection")]
public int Port { get; set; }

Property Value

int

Stream

Gets the stream for receive and write operations.

protected override Stream Stream { get; }

Property Value

Stream

Methods

Close()

Closes the client connection and stops listening.

public override void Close()

Exit()

De initializes the module.

public override void Exit()

Initialize()

Initializes the module.

public override void Initialize()

Exceptions

InvalidOperationException

Throw when EndDelimiter is null.

Open()

Starts listening on the Port.

public override void Open()

ShowServiceView()

Shows the service view.

public override void ShowServiceView()