WCF VS. Sockets

前端 未结 4 933
孤街浪徒
孤街浪徒 2020-12-09 05:38

I would like to know which of WCF or .NET Sockets is the more efficient and the more recommended in a game developpment scenario.

Here are the different parts of the

4条回答
  •  无人及你
    2020-12-09 06:30

    Both technology can manage the number of requests per second that you are mentionning, however the programming model is quite different. Sockets are very low level and require that you build your own communication protocol on top of it. However, the overhead can be minimal. WCF is modelled after RPC (Remote Procedure Calls) and provides an abstraction on the transport. It allows you to use the same API with very different technologies such as web services or messaging. However, the abstraction provided has its own set of problems such as a certain complexity or steep learning curve...

    In your case, you could also look at messaging technologies such as MSMQ, ZeroMQ or ActiveMQ that provide a nice abstraction over sockets and simplify the development a lot.

提交回复
热议问题