/// <summary>
        /// Handles ClientConnected event of _scsServer object.
        ///
        /// </summary>
        /// <param name="sender">Source of event</param><param name="e">Event arguments</param>
        private void ScsServer_ClientConnected(object sender, ServerClientEventArgs e)
        {
            RequestReplyMessenger <IScsServerClient> requestReplyMessenger = new RequestReplyMessenger <IScsServerClient>(e.Client);

            requestReplyMessenger.MessageReceived += new EventHandler <MessageEventArgs>(this.Client_MessageReceived);
            requestReplyMessenger.Start();
            IScsServiceClient serviceClient = ScsServiceClientFactory.CreateServiceClient(e.Client, requestReplyMessenger);

            this._serviceClients[serviceClient.ClientId] = serviceClient;
            this.OnClientConnected(serviceClient);
        }
Exemple #2
0
        /// <summary>
        /// Handles ClientConnected event of _scsServer object.
        /// </summary>
        /// <param name="sender">Source of event</param>
        /// <param name="e">Event arguments</param>
        private void ScsServer_ClientConnected(object sender, ServerClientEventArgs e)
        {
            var requestReplyMessenger = new RequestReplyMessenger <IScsServerClient>(e.Client);

            requestReplyMessenger.MessageReceived += Client_MessageReceived;
            requestReplyMessenger.Start();

            var serviceClient = ScsServiceClientFactory.CreateServiceClient(e.Client, requestReplyMessenger);

            _serviceClients[serviceClient.ClientId] = serviceClient;
            OnClientConnected(serviceClient);
        }