WCF VS. Sockets

前端 未结 4 926
孤街浪徒
孤街浪徒 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:23

    If you don't need real-time performance (You're using C# so i guess that's the case) then I'd suggest WCF.

    WCF will give you a much easier OOP style tools to write your Server-Client protocol.
    The advantage with WCF is that in the long run the protocols and code you eventually write in it is much easier to maintain and follow.

    It'll be easier to add and change features to the protocol if you ever want to add anything.

    WCF is highly customizable so you better read about the different data-sending methods it provides, and the ways to overload them.

    You can use different binding types to optimize your data transfer:

    WCF Binding In Depth

提交回复
热议问题