Show / Hide Table of Contents

Class CustomRPC

Wrapper for Valheim's RPC calls implementing convenience delegate methods for client and server processing of packages.
Automatically compresses and slices big packages to fit into the Steam package limit.
All sending and processing of received packages is executed in Coroutines to ensure the game loop's execution.
Inheritance
System.Object
CustomEntity
CustomRPC
Inherited Members
CustomEntity.SourceMod
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Jotunn.Entities
Assembly: Jotunn.dll
Syntax
public class CustomRPC : CustomEntity

Properties

| Improve this Doc View Source

IsProcessing

True, if this RPC is currently processing received data. This is always true while executing the registered delegates.
Declaration
public bool IsProcessing { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsProcessingOther

True, if this RPC is processing received data outside the current delegate call. This should only be used in the registered delegate methods to determine if this RPC is already processing another package.
Declaration
public bool IsProcessingOther { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsReceiving

True, if this RPC is currently receiving data
Declaration
public bool IsReceiving { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsSending

True, if this RPC is currently sending data
Declaration
public bool IsSending { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Name

Name of the custom RPC as defined at instantiation
Declaration
public string Name { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

Initiate()

Initiates a RPC exchange with the server by sending an empty package.
Declaration
public void Initiate()
| Improve this Doc View Source

SendPackage(List<ZNetPeer>, ZPackage)

Send a package to a list of peers. Compresses and fragments the package if necessary.
Declaration
public void SendPackage(List<ZNetPeer> peers, ZPackage package)
Parameters
Type Name Description
System.Collections.Generic.List<ZNetPeer> peers
ZPackage package
| Improve this Doc View Source

SendPackage(Int64, ZPackage)

Send a package to a single target. Compresses and fragments the package if necessary.
Declaration
public void SendPackage(long target, ZPackage package)
Parameters
Type Name Description
System.Int64 target
ZPackage package
| Improve this Doc View Source

SendPackageRoutine(List<ZNetPeer>, ZPackage)

Coroutine to send a package to a list of peers. Compresses and fragments the package if necessary.
Declaration
public IEnumerator SendPackageRoutine(List<ZNetPeer> peers, ZPackage package)
Parameters
Type Name Description
System.Collections.Generic.List<ZNetPeer> peers
ZPackage package
Returns
Type Description
System.Collections.IEnumerator
| Improve this Doc View Source

SendPackageRoutine(Int64, ZPackage)

Coroutine to send a package to a single target. Compresses and fragments the package if necessary.
Declaration
public IEnumerator SendPackageRoutine(long target, ZPackage package)
Parameters
Type Name Description
System.Int64 target
ZPackage package
Returns
Type Description
System.Collections.IEnumerator

Extension Methods

PrefabExtension.FixReferences(Object)
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾