如何将任何数据传递给新创建的Web服务

时间:2022-05-12 05:32:01

I am working at the client-server application which server part will have more than one logical processors to process client requests. Moreover is assumed that communication channels shouldn't be only TCP/IP, for example, but at least RS485-based as well.

我在客户端 - 服务器应用程序工作,服务器部分将有多个逻辑处理器来处理客户端请求。此外,假设通信信道不应仅是TCP / IP,而是至少基于RS485。

The simplified sheme is shown on the picture below: 如何将任何数据传递给新创建的Web服务 So, the question: how can I pass the IRequestProcessor reference to the IConnection WCF implementation instance, which is created automatically by the WCF framework as the response to an incoming request?

简化的sheme如下图所示:那么,问题是:如何将IRequestProcessor引用传递给IConnection WCF实现实例,该实例实例由WCF框架自动创建,作为对传入请求的响应?

According to the picture: how can be realized the links, shown with the bold arrows, for the WCF IConnection instances?

根据图片:对于WCF IConnection实例,如何实现用粗体箭头显示的链接?

First thought was to implement some static memeber for the WcfConnection (which is IConnection implementation) class. This static member should hold the selector which will select the appropriate IRequestProcessor implementation instance using some rules. But I hope there whould be better solution of this problem.

首先想到的是为WcfConnection(这是IConnection实现)类实现一些静态的memeber。这个静态成员应该拥有选择器,该选择器将使用一些规则选择适当的IRequestProcessor实现实例。但我希望有更好的解决方案。

1 个解决方案

#1


#1