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
-
PropertyChangedBaseTcpServerModule
- Implements
-
INotifyPropertyChangedEx
- Inherited Members
-
PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.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
stringThe name for the module.
Properties
Icon
Gets an icon which is representative for the module.
public override Uri Icon { get; }
Property Value
IsConnected
Gets a value indicating whether a client is connected.
public override bool IsConnected { get; }
Property Value
Port
Gets or sets the incoming port.
[Configuration(0, Description = "Port for TCP connection")]
public int Port { get; set; }
Property Value
Stream
Gets the stream for receive and write operations.
protected override Stream Stream { get; }
Property Value
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()