Vixen
02b45cc4
csharp
public sealed class SessionRpcTransport

Sends a router's calls through a session.

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

Remarks

The join between the two halves, and the reason it is a class of its own rather than the session implementing IRpcTransport directly: a call has to be marked as a call before it goes into the session's opaque payload space, or the receiver cannot tell it from a snapshot or from something the game sent. Wiring the session up as a transport without that would be a connection that looked right and mixed three streams together.

The mirror of it is one line on the receiving side: unwrap, and hand a Rpc to Receive.

Fields and properties (2)

  • public NetworkSession Session

    The session calls go through.

  • public long DroppedCount

    Calls that did not fit in a packet and were not sent.

Methods (4)

  • public SessionRpcTransport(NetworkSession session)

    Wraps a session.

  • public void SendToServer(ReadOnlySpan<byte> payload, Channel channel)

    Sends to the server.

  • public void SendToPlayer(PlayerId player, ReadOnlySpan<byte> payload, Channel channel)

    Sends to one player.

  • public void SendToAll(ReadOnlySpan<byte> payload, Channel channel)

    Sends to everybody in the session.

Used by (3)

  • GameClientMultiplayer
  • GameServerMultiplayer
  • RpcOverSessionTestsVixen.Net.Tests