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.
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.
Inherited Members
Namespace: Jotunn.Entities
Assembly: Jotunn.dll
Syntax
public class CustomRPC : CustomEntity
Properties
Name | Description |
---|---|
IsProcessing | True, if this RPC is currently processing received data. This is always true while executing the registered delegates. |
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. |
IsReceiving | True, if this RPC is currently receiving data |
IsSending | True, if this RPC is currently sending data |
Name | Name of the custom RPC as defined at instantiation |
Methods
Name | Description |
---|---|
Initiate() | Initiates a RPC exchange with the server by sending an empty package. |
SendPackage(List<ZNetPeer>, ZPackage) | Send a package to a list of peers. Compresses and fragments the package if necessary. |
SendPackage(long, ZPackage) | Send a package to a single target. Compresses and fragments the package if necessary. |
SendPackageRoutine(List<ZNetPeer>, ZPackage) | Coroutine to send a package to a list of peers. Compresses and fragments the package if necessary. |
SendPackageRoutine(long, ZPackage) | Coroutine to send a package to a single target. Compresses and fragments the package if necessary. |
ToString() | Returns a string that represents the current object. |