Vixen
02b45cc4
csharp
public sealed class RpcMethod

One remote call: what it is, who may make it, and how it travels.

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

Remarks

Identified by a hash of the declaring type and the signature, not by a counter. Adding a method therefore does not renumber the others, and two builds that disagree about what a call is are detected rather than misrouted into the wrong handler with the wrong arguments — which is the failure that corrupts a save file rather than throwing.

The hash is the identity; the index is the encoding. A packet carries the position in the manifest, because a 32-bit hash costs five bytes as a variable-length integer and calls are the small packets. ManifestHash is what makes that safe.

Fields and properties (11)

  • public string DeclaringType

    The type that declares the handler.

  • public string Signature

    The signature — the name and the parameter types, as the generator wrote it.

  • public uint TypeId

    The declaring type's stable id.

  • public uint MethodId

    This method's stable id, within its type.

  • public RpcKind Kind

    Which way it travels.

  • public bool RequireOwnership

    Whether the caller has to own the object. Meaningful for Server.

  • public Channel Channel

    How it is sent.

  • public bool ExpectsReply

    Whether the caller awaits an answer.

  • public RpcTarget Target

    Who a server-to-client call goes to.

  • public int TypeIndex

    The declaring type's position in the manifest, or -1 before it is registered.

  • public int MethodIndex

    This method's position within its type, or -1 before it is registered.

Methods (3)

  • public RpcMethod(string declaringType, string signature, RpcKind kind, bool requireOwnership, Channel channel, RpcTarget target, bool expectsReply = false)

    Describes a call.

  • public override string ToString()

    Returns a string that represents the current object.

  • public static uint Hash(string name)

    The stable id of a name: 32-bit FNV-1a.

Used by (18)

  • AvatarControllerMultiplayer
  • RpcSendersMultiplayer
  • AnsweringVixen.Net.Tests
  • AwaitableRpcTestsVixen.Net.Tests
  • CounterVixen.Net.Tests
  • CountingInvokerVixen.Net.Fuzz
  • GeneratedTurretVixen.Net.Generators.Tests
  • PendingVixen.Net
  • PendingCallsVixen.Net
  • RpcContextVixen.Net
  • RpcGeneratorTestsVixen.Net.Generators.Tests
  • RpcManifestVixen.Net
  • RpcRouterVixen.Net
  • RpcRouterTargetVixen.Net.Fuzz
  • RpcSendersVixen.Net.Generators.Tests
  • RpcTestsVixen.Net.Tests
  • SendersVixen.Net.Tests
  • TurretVixen.Net.Tests