Broadcast like UDP with the reliability of TCP

后端 未结 16 1420
陌清茗
陌清茗 2021-01-30 02:30

I\'m working on a .net solution that is run completely inside a single network. When users make a change to the system, I want to launch an announcement and have everyone else h

相关标签:
16条回答
  • 2021-01-30 03:06

    Broadcast is not what you want. Since there could and probably will be devices attached to this network which don't care about your message, you should use Multicast. Unlike broadcast messages, which must be sent to and processed by every client on the network, Multicast messages are delivered only to interested clients (ie those which have some intention to receive this particular type of message and act on it).

    If you later scale this system up so that it needs to be routed over a large network, multicast can scale to that, whereas broadcast won't, so you gain a scalability benefit which you might appreciate later. Meanwhile you eliminate unnecessary overhead in switches and other devices that don't need to see these "something changed" messages.

    0 讨论(0)
  • 2021-01-30 03:06

    do a RDP multicast.

    0 讨论(0)
  • 2021-01-30 03:07

    Almost all games have a need for the fast-reacting properties (and to a lesser extent, the connectionless properties) of UDP and the reliability of TCP. What they do is they build their own reliable protocol on top of UDP. This gives them the ability to just burst packets to whereever and optionally make them reliable, as well.

    The reliable packet system is usually a simple retry-until-acknowledged system simpler than TCP but there are protocols which go way beyond what TCP can offer.

    Your situation sounds very simple. You'll probably be able to make the cleanest solution yourself - just make every client send back an "I heard you" response and have the server keep trying until it gets it (or gives up).

    If you want something more, most custom protocol libraries are in C++, so I am not sure how much use they'll be to you. However, my knowledge here is a few years old - perhaps some protocols have been ported over by now. Hmm... RakNet and enet are two C/C++ libraries that come to mind.

    0 讨论(0)
  • 2021-01-30 03:07

    Yoy should take a look at the Norm (NACK-Oriented Reliable Multicast) specification. You can find information about Norm here.

    The NORM protocol is designed to provide end-to-end reliable transport of bulk data objects or streams over generic IP multicast routing and forwarding services. NORM uses a selective, negative acknowledgement (NACK) mechanism for transport reliability and offers additional protocol mechanisms to conduct reliable multicast sessions with limited "a priori" coordination among senders and receivers

    It somewhat very well known in the military world.

    Norm specs.

    Norm Source

    0 讨论(0)
  • 2021-01-30 03:08

    Take a look at sctp which has a combination of tcp and udp features. There is a windows implementation available.

    0 讨论(0)
  • 2021-01-30 03:08

    You could use Spread to do group communication.

    0 讨论(0)
提交回复
热议问题