Exemplo n.º 1
0
        public FrameRequest(IRouter pRouter, RoutingFrame pRequest)
        {
            Origin = pRouter;
            Frame  = pRequest;

            KeepAliveMonitor = new KeepAliveMonitor(15);
        }
Exemplo n.º 2
0
        public RabbitMQRequest(string pPublisherID, IRouter pRouter, RoutingFrame pFrame)
        {
            PublisherID = pPublisherID;
            Router      = pRouter;
            Request     = pFrame;

            KeepAliveMonitor = new KeepAliveMonitor(15);
        }
Exemplo n.º 3
0
        public ConsumerRouter(SenderQueue pConsumerQueue, RequestManager pRequestManager)
        {
            Consumer       = pConsumerQueue;
            RequestManager = pRequestManager;

            KeepAliveMonitor               = new KeepAliveMonitor(60);
            KeepAliveMonitor.TimeOut      += KeepAliveMonitor_TimeOut;
            KeepAliveMonitor.UnResponsive += KeepAliveMonitor_UnResponsive;
            KeepAliveMonitor.Start();
        }
Exemplo n.º 4
0
        public Request(IClient pClient, IRequestMessage pMessage, Action <T> pCallback, IKeepAliveMonitor pKeepAliveMonitor)
        {
            _objClient           = pClient;
            Message              = pMessage;
            _objAction           = pCallback;
            _objKeepAliveMonitor = pKeepAliveMonitor;

            _objKeepAliveMonitor.TimeOut      += _objKeepAliveMonitor_TimeOut;
            _objKeepAliveMonitor.UnResponsive += _objKeepAliveMonitor_UnResponsive;

            Log.Info($"Creating {Message.Name}({Message.ID}) on {_objClient.ID}");
        }
Exemplo n.º 5
0
        public Client(IWebSocketBehavior pClient, IKeepAliveMonitor pKeepAliveMonitor)
        {
            ID = Guid.NewGuid().ToString();
            //_objCancelationToken = _objCancelationSource.Token;

            _objClient                         = pClient;
            _objKeepAliveMonitor               = pKeepAliveMonitor;
            _objKeepAliveMonitor.TimeOut      += _objKeepAliveMonitor_TimeOut;
            _objKeepAliveMonitor.UnResponsive += _objKeepAliveMonitor_UnResponsive;

            _objClient.OnCloseReceived   += _objClient_OnCloseReceived;
            _objClient.OnErrorReceived   += _objClient_OnErrorReceived;
            _objClient.OnMessageReceived += _objClient_OnMessageReceived;

            _objKeepAliveMonitor.Start();

            Log.Info($"Client {ID} connected");
        }
Exemplo n.º 6
0
 internal WebsocketClient(IWebSocketClient pWebSocket, IKeepAliveMonitor pKeepAliveMonitor)
 {
     _objWebSocketClient  = pWebSocket;
     _objKeepAliveMonitor = pKeepAliveMonitor;
 }