开发者

Ideal WCF Implementation for 25 Clients

开发者 https://www.devze.com 2023-01-22 00:12 出处:网络
I currently code an internet cafe software in WCF for 25 clients. I read much about instanceContextMode, Concurrency and Duplex and other stuff and saw that everyone was having problems because of wro

I currently code an internet cafe software in WCF for 25 clients. I read much about instanceContextMode, Concurrency and Duplex and other stuff and saw that everyone was having problems because of wrong implementation of these settings.

Here is my scenario: clients are getting time info from server every 5 or 10 seconds, clients and server should be able to send messages to eachother . What settings开发者_开发知识库(Concurrency/InstanceMode) would you recemmend me not to have thread, deadlock and other issues?

--the clients and the server should be able to send messages to eachother(So Duplex will be necessary?)

--In order for server to serve all the clients at the same time, Concurrency is Multiple and instance is persession?

Thanks in advance


Personnally, I'd use these settings:

    [ServiceBehavior
(
    InstanceContextMode = InstanceContextMode.PerCall,
    ConcurrencyMode = ConcurrencyMode.Multiple
)]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号