Server/Servers.cs
changeset 20 e3d394dd0388
parent 19 1a85ec255882
child 21 274a6b27c3f9
     1.1 --- a/Server/Servers.cs	Tue Aug 12 21:27:35 2014 +0200
     1.2 +++ b/Server/Servers.cs	Wed Aug 13 23:02:40 2014 +0200
     1.3 @@ -1,6 +1,7 @@
     1.4  using System;
     1.5  using System.Windows.Forms;
     1.6  using System.Collections;
     1.7 +using System.ServiceModel;
     1.8  
     1.9  namespace SharpDisplayManager
    1.10  {
    1.11 @@ -8,6 +9,7 @@
    1.12      /// Implement our display service.
    1.13      /// This class is instantiated anew whenever a client send a request.
    1.14      /// </summary>
    1.15 +    [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)]
    1.16      class DisplayServer : IDisplayService
    1.17      {
    1.18          //From IDisplayService
    1.19 @@ -41,6 +43,13 @@
    1.20                  }
    1.21          }
    1.22  
    1.23 +        //
    1.24 +        public void Connect(string aClientName)
    1.25 +        {
    1.26 +            IDisplayServiceCallback callback = OperationContext.Current.GetCallbackChannel<IDisplayServiceCallback>();
    1.27 +            callback.OnConnected();
    1.28 +        }
    1.29 +
    1.30      }
    1.31  
    1.32  }