WCF服务请求和响应 [英] WCF Services request and response

查看:80
本文介绍了WCF服务请求和响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在根据获取响应作为FCFS向WCF服务发送请求,但我希望响应基于设置的时间..例如,首先我通过设置5分钟时间发送请求认为它是另一个设置时间2分钟认为它是B我需要B的bez立即响应我为B设置时间2分钟和A设置5分钟。我需要在得到A的响应之前响应B.

解决方案

我没试过这个,可能这种方法可以工作。



1.将延迟作为请求中的一个参数传递给分钟。

2.在服务器中设置一个线程并制作线程按照请求发送的分钟数睡觉。



这是一个一般性的想法,请确保在实施之前考虑服务的性能,实例化等。

hi,

I 'm sending request to the WCF service based on that getting response as a FCFS but i want the response based on the time set..for example first i send request by setting 5 min time considered it as A another one set a time with 2min considered it as B i need the immediate response for the B bez i set a time 2 min for B and 5min for A. I need response for B before getting response of A.

解决方案

I have not tried this, may be this approach can work.

1. Pass the delay in minutes as one of the parameter in request.
2. Set a thread in server and make the thread to sleep for the minutes sent in request.

This is a general idea, please make sure you consider the performance of the service, instantiating etc. before implementing it.


这篇关于WCF服务请求和响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆