Server/Services.cs
author sl
Wed, 13 Aug 2014 23:02:40 +0200
changeset 20 e3d394dd0388
parent 19 1a85ec255882
child 21 274a6b27c3f9
permissions -rw-r--r--
Now support duplex mode with new client.
     1 using System;
     2 using System.ServiceModel;
     3 using System.Collections;
     4 
     5 
     6 namespace SharpDisplayManager
     7 {
     8     [ServiceContract(CallbackContract = typeof(IDisplayServiceCallback))]
     9     public interface IDisplayService
    10     {
    11         [OperationContract(IsOneWay = true)]
    12         void Connect(string aClientName);
    13 
    14         [OperationContract(IsOneWay = true)]
    15         void SetText(int aLineIndex, string aText);
    16 
    17         [OperationContract(IsOneWay = true)]
    18         void SetTexts(System.Collections.Generic.IList<string> aTexts);
    19     }
    20 
    21 
    22     public interface IDisplayServiceCallback
    23     {
    24         [OperationContract(IsOneWay = true)]
    25         void OnConnected();
    26 
    27         [OperationContract]
    28         void OnServerClosing();
    29     }
    30 }