SignalR Broadcast Intercept Using Pipeline Module

人走茶凉 提交于 2020-01-14 02:34:08

问题


I have created a setup where I have a back-end service that is broadcasting messages using SignalR through a SQL backplane and clients are receiving the messages through a MVC 5 + SignalR web application on a web farm. I want to intercept the messages before they get to the client from the web application and make some changes to the message, specifically return HTML to the client instead of the raw data.

I have been able to achieve this in a development environment where the messages originate from the web application (not farmed) adding a HubPipelineModule class with an OnBeforeOutgoing method override. However this part of the pipeline is not called when the message is broadcast from a different source (the back-end service).

Where (and how) can I hook into the SignalR pipeline to to get the OnBeforeOutgoing method to be called when transitioning from different broadcasting sources?

来源:https://stackoverflow.com/questions/22839295/signalr-broadcast-intercept-using-pipeline-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!