Client/Server duplex is still a mess in C#.
2 using System.Collections.Generic;
5 using System.Threading.Tasks;
6 using System.ServiceModel;
7 using System.Collections;
10 namespace SharpDisplayInterface
13 [ServiceContract(CallbackContract = typeof(IDisplayServiceCallback))]
14 public interface IDisplayService
16 [OperationContract(IsOneWay = true)]
17 void Connect(string aClientName);
19 [OperationContract(IsOneWay = true)]
20 void Disconnect(string aClientName);
22 [OperationContract(IsOneWay = true)]
23 void SetText(int aLineIndex, string aText);
25 [OperationContract(IsOneWay = true)]
26 void SetTexts(System.Collections.Generic.IList<string> aTexts);
30 public interface IDisplayServiceCallback
32 [OperationContract(IsOneWay = true)]
35 [OperationContract(IsOneWay = true)]
36 void OnServerClosing();