Пример #1
0
        private bool CloseConnection()
        {
            bool ret = bridgeClient.CloseConnection();

            bridgeClient = new CyPhyMetaLinkBridgeClient.MetaLinkBridgeClient();
            return(ret);
        }
Пример #2
0
 protected void StartTestingClient()
 {
     testingClient = new MetaLinkBridgeClient();
     receivedMessages = new List<Edit>();
     receivedMessagesQueue = new System.Collections.Concurrent.BlockingCollection<Edit>(new ConcurrentQueue<Edit>());
     testingClient.EstablishConnection(msg =>
         {
             lock (receivedMessages)
             {
                 receivedMessages.Add(msg);
             }
             receivedMessagesQueue.Add(msg);
         },
         connectionClosed: exc => KillMetaLink()
     );
 }