Vixen
02b45cc4
csharp
public interface IBroadcast<TSelf> where TSelf : struct, IBroadcast<TSelf>

A message that is about nothing in particular, and how it is written.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Hand-written rather than generated, for now. The RPC generator's job is to turn a method signature into a wire format; a broadcast is already a struct whose fields are the wire format, so there is less to derive and the interface is a smaller ask than an attribute plus a generator pass. [Replicated]'s generator is the obvious place to grow this into when a game has thirty of them.

Static abstract members, so the id is a property of the type rather than of an instance — the receiver has to know which type to construct before it has one to ask.

Fields and properties (1)

  • string BroadcastName

    The name this message is known by on the wire.

Methods (2)

  • void Write(ref BitWriter writer)

    Writes this message.

  • bool TryRead(ref BitReader reader, out TSelf value)

    Reads one.

Used by (4)

  • BroadcastRouterVixen.Net
  • ChatVixen.Net.Tests
  • CountdownVixen.Net.Tests
  • PredictionHealthVixen.Net