reckfellENGINE

MultiplayerPeerExtension

Class that can be inherited to implement custom multiplayer API networking layers via ReckfellExtension.

On this page
class MultiplayerPeerExtensionReckfellSharpInherits MultiplayerPeer

Class that can be inherited to implement custom multiplayer API networking layers via ReckfellExtension.

This class is designed to be inherited from a ReckfellExtension plugin to implement custom networking layers for the multiplayer API (such as WebRTC). All the methods below must be implemented to have a working custom multiplayer implementation. See also MultiplayerApi.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

MultiplayerPeerExtensionConstructor
# MultiplayerPeerExtension
C#
public MultiplayerPeerExtension();

Methods21

_Closevoid
# _Close
C#
public virtual void _Close();

Called when the multiplayer peer should be immediately closed (see MultiplayerPeer.Close).

_DisconnectPeervoid
# _DisconnectPeer
C#
public virtual void _DisconnectPeer(int peer, bool force);

Called when the connected peer should be forcibly disconnected (see MultiplayerPeer.DisconnectPeer).

Parameters
NameTypeDefault
peerint—
forcebool—
_GetAvailablePacketCountint
# _GetAvailablePacketCount
C#
public virtual int _GetAvailablePacketCount();

Called when the available packet count is internally requested by the MultiplayerApi.

Returns int
_GetConnectionStatusMultiplayerPeer.ConnectionStatus
# _GetConnectionStatus
C#
public virtual MultiplayerPeer.ConnectionStatus _GetConnectionStatus();

Called when the connection status is requested on the MultiplayerPeer (see MultiplayerPeer.GetConnectionStatus).

Returns MultiplayerPeer.ConnectionStatus
_GetMaxPacketSizeint
# _GetMaxPacketSize
C#
public virtual int _GetMaxPacketSize();

Called when the maximum allowed packet size (in bytes) is requested by the MultiplayerApi.

Returns int
_GetPacketChannelint
# _GetPacketChannel
C#
public virtual int _GetPacketChannel();

Called to get the channel over which the next available packet was received. See MultiplayerPeer.GetPacketChannel.

Returns int
_GetPacketModeMultiplayerPeer.TransferModeEnum
# _GetPacketMode
C#
public virtual MultiplayerPeer.TransferModeEnum _GetPacketMode();

Called to get the transfer mode the remote peer used to send the next available packet. See MultiplayerPeer.GetPacketMode.

Returns MultiplayerPeer.TransferModeEnum
_GetPacketPeerint
# _GetPacketPeer
C#
public virtual int _GetPacketPeer();

Called when the ID of the MultiplayerPeer who sent the most recent packet is requested (see MultiplayerPeer.GetPacketPeer).

Returns int
_GetPacketScriptbyte[]
# _GetPacketScript
C#
public virtual byte[] _GetPacketScript();

Called when a packet needs to be received by the MultiplayerApi, if _get_packet isn't implemented. Use this when extending this class via C#.

Returns byte[]
_GetTransferChannelint
# _GetTransferChannel
C#
public virtual int _GetTransferChannel();

Called when the transfer channel to use is read on this MultiplayerPeer (see MultiplayerPeer.TransferChannel).

Returns int
_GetTransferModeMultiplayerPeer.TransferModeEnum
# _GetTransferMode
C#
public virtual MultiplayerPeer.TransferModeEnum _GetTransferMode();

Called when the transfer mode to use is read on this MultiplayerPeer (see MultiplayerPeer.TransferMode).

Returns MultiplayerPeer.TransferModeEnum
_GetUniqueIdint
# _GetUniqueId
C#
public virtual int _GetUniqueId();

Called when the unique ID of this MultiplayerPeer is requested (see MultiplayerPeer.GetUniqueId). The value must be between 1 and 2147483647.

Returns int
_IsRefusingNewConnectionsbool
# _IsRefusingNewConnections
C#
public virtual bool _IsRefusingNewConnections();

Called when the "refuse new connections" status is requested on this MultiplayerPeer (see MultiplayerPeer.RefuseNewConnections).

Returns bool
_IsServerbool
# _IsServer
C#
public virtual bool _IsServer();

Called when the "is server" status is requested on the MultiplayerApi. See MultiplayerApi.IsServer.

Returns bool
_IsServerRelaySupportedbool
# _IsServerRelaySupported
C#
public virtual bool _IsServerRelaySupported();

Called to check if the server can act as a relay in the current configuration. See MultiplayerPeer.IsServerRelaySupported.

Returns bool
_Pollvoid
# _Poll
C#
public virtual void _Poll();

Called when the MultiplayerApi is polled. See MultiplayerApi.Poll.

_PutPacketScriptError
# _PutPacketScript
C#
public virtual Error _PutPacketScript(byte[] buffer);

Called when a packet needs to be sent by the MultiplayerApi, if _put_packet isn't implemented. Use this when extending this class via C#.

Parameters
NameTypeDefault
bufferbyte[]—
Returns Error
_SetRefuseNewConnectionsvoid
# _SetRefuseNewConnections
C#
public virtual void _SetRefuseNewConnections(bool enable);

Called when the "refuse new connections" status is set on this MultiplayerPeer (see MultiplayerPeer.RefuseNewConnections).

Parameters
NameTypeDefault
enablebool—
_SetTargetPeervoid
# _SetTargetPeer
C#
public virtual void _SetTargetPeer(int peer);

Called when the target peer to use is set for this MultiplayerPeer (see MultiplayerPeer.SetTargetPeer).

Parameters
NameTypeDefault
peerint—
_SetTransferChannelvoid
# _SetTransferChannel
C#
public virtual void _SetTransferChannel(int channel);

Called when the channel to use is set for this MultiplayerPeer (see MultiplayerPeer.TransferChannel).

Parameters
NameTypeDefault
channelint—
_SetTransferModevoid
# _SetTransferMode
C#
public virtual void _SetTransferMode(MultiplayerPeer.TransferModeEnum mode);

Called when the transfer mode is set on this MultiplayerPeer (see MultiplayerPeer.TransferMode).

Parameters
NameTypeDefault
modeMultiplayerPeer.TransferModeEnum—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.