Exemplo n.º 1
0
        public DynamicEndpoint(dynamic client)
        {
            this.client = client;
            ITransportationLayer transport = client;

            transport.ConnectionEstablished += () => ConnectionEstablished?.Invoke();
            transport.ConnectionLost        += () => ConnectionLost?.Invoke();
            transport.ProviderDataReady     += data => ProviderDataReady?.Invoke(data);
        }
Exemplo n.º 2
0
        private ApplicationConnectionManager(ITransportationLayer transportationLayer,
                                             ProtocolTree protocolTree, FTConnectionController ft) : this(transportationLayer)
        {
            this.ft = ft;

            tree.Register(ft);
            tree.Entry(ft);
            tree.Connect(ft, protocolTree);

            ft.ConnectionLost += () =>
            {
                CloseConnectionAndCleanUp();
                ConnectionLost?.Invoke();
            };
        }
Exemplo n.º 3
0
        private ApplicationConnectionManager(ITransportationLayer transportationLayer)
        {
            this.transportationLayer = transportationLayer;

            tree.DataIntegrityError    += OnDataIntegrityError;
            tree.DataSymmetricityError += OnDataSymmetricityError;

            dataSerializer.DataIntegrityError    += OnDataIntegrityError;
            dataSerializer.DataSymmetricityError += OnDataSymmetricityError;

            transportationLayer.ConnectToUpstream(dataSerializer);
            dataSerializer.ConnectToDownstream(transportationLayer);

            dataSerializer.ConnectToUpstream(tree);
            tree.ConnectToDownstream(dataSerializer);
        }
Exemplo n.º 4
0
 public ApplicationConnectionManager(ITransportationLayer transportationLayer, ProtocolTree protocolTree,
                                     IStateDataProvider stateDataProvider, int heartBeatTimeInterval, int silenceTimeLimit)
     : this(transportationLayer, protocolTree, FTConnectionController.CreateStatefulSession(
                transportationLayer, stateDataProvider, heartBeatTimeInterval, silenceTimeLimit))
 {
 }
Exemplo n.º 5
0
 public ApplicationConnectionManager(ITransportationLayer transportationLayer, ProtocolTree protocolTree)
     : this(transportationLayer)
 {
     tree.Entry(protocolTree);
     transportationLayer.ConnectionLost += CloseConnectionAndCleanUp;
 }