Broadcasts

Broadcasting in networking systems (like PurrNet) allows you to easily send and receive data without requiring network identities. It can be useful in certain systems and situations, however, for most setups, it will be just as good and easier to work with RPC's.

In order to work with broadcasts, you need 3 things:

  • Custom data structure to send

  • Subscribing to the broadcasting event

  • Sending the data

The client can only broadcast directly to the server, where as the server/host can broadcast to everyone.

A basic broadcasting setup will look something like this:

Last updated