Interface INetwork.IManagedInterface
Represents the managed interface implemented by its unmanaged counterpart.
public interface INetwork.IManagedInterface : IUnmanagedInterface
- Inherited Members
Methods
Ban(BanEntry, TimeSpan)
Bans a peer from the network.
void Ban(BanEntry entry, TimeSpan expire)
Parameters
entryBanEntryThe ban entry containing details about the ban.
expireTimeSpanThe duration of the ban before it expires.
BroadcastPacket(SpanLite<byte>, int, IPlayer, bool)
Broadcasts a packet to all peers on this network.
bool BroadcastPacket(SpanLite<byte> data, int channel, IPlayer exceptPeer = default, bool dispatchEvents = true)
Parameters
dataSpanLite<byte>The data span with the length in bits.
channelintThe channel to use for broadcasting the packet.
exceptPeerIPlayerThe peer to exclude from the broadcast.
dispatchEventsboolWhether to dispatch packet-related events.
Returns
- bool
trueif the packet was broadcast successfully; otherwise,false.
BroadcastRPC(int, SpanLite<byte>, int, IPlayer, bool)
Broadcasts an RPC to all peers on this network.
bool BroadcastRPC(int id, SpanLite<byte> data, int channel, IPlayer exceptPeer = default, bool dispatchEvents = true)
Parameters
idintThe RPC ID for the current network.
dataSpanLite<byte>The data span with the length in bits.
channelintThe channel to use for broadcasting the RPC.
exceptPeerIPlayerThe peer to exclude from the broadcast.
dispatchEventsboolWhether to dispatch RPC-related events.
Returns
- bool
trueif the RPC was broadcast successfully; otherwise,false.
Disconnect(IPlayer)
Disconnects a peer from the network.
void Disconnect(IPlayer peer)
Parameters
peerIPlayerThe network peer to disconnect.
GetEventDispatcher()
Gets the dispatcher which dispatches network events.
IEventDispatcher<INetworkEventHandler> GetEventDispatcher()
Returns
- IEventDispatcher<INetworkEventHandler>
An event dispatcher for network events.
GetInEventDispatcher()
Gets the dispatcher which dispatches incoming network events.
IEventDispatcher<INetworkInEventHandler> GetInEventDispatcher()
Returns
- IEventDispatcher<INetworkInEventHandler>
An event dispatcher for incoming network events.
GetNetworkType()
Gets the network type of the network.
ENetworkType GetNetworkType()
Returns
- ENetworkType
The network type of the network.
GetOutEventDispatcher()
Gets the dispatcher which dispatches outgoing network events.
IEventDispatcher<INetworkOutEventHandler> GetOutEventDispatcher()
Returns
- IEventDispatcher<INetworkOutEventHandler>
An event dispatcher for outgoing network events.
GetPerPacketInEventDispatcher()
Gets the dispatcher which dispatches incoming network events bound to a specific packet ID.
IIndexedEventDispatcher<ISingleNetworkInEventHandler> GetPerPacketInEventDispatcher()
Returns
- IIndexedEventDispatcher<ISingleNetworkInEventHandler>
An indexed event dispatcher for incoming packet events.
GetPerPacketOutEventDispatcher()
Gets the dispatcher which dispatches outgoing network events bound to a specific packet ID.
IIndexedEventDispatcher<ISingleNetworkOutEventHandler> GetPerPacketOutEventDispatcher()
Returns
- IIndexedEventDispatcher<ISingleNetworkOutEventHandler>
An indexed event dispatcher for outgoing packet events.
GetPerRPCInEventDispatcher()
Gets the dispatcher which dispatches incoming network events bound to a specific RPC ID.
IIndexedEventDispatcher<ISingleNetworkInEventHandler> GetPerRPCInEventDispatcher()
Returns
- IIndexedEventDispatcher<ISingleNetworkInEventHandler>
An indexed event dispatcher for incoming RPC events.
GetPerRPCOutEventDispatcher()
Gets the dispatcher which dispatches outgoing network events bound to a specific RPC ID.
IIndexedEventDispatcher<ISingleNetworkOutEventHandler> GetPerRPCOutEventDispatcher()
Returns
- IIndexedEventDispatcher<ISingleNetworkOutEventHandler>
An indexed event dispatcher for outgoing RPC events.
GetPing(IPlayer)
Gets the last ping for a peer on this network.
uint GetPing(IPlayer peer)
Parameters
peerIPlayerThe network peer to get the ping for.
Returns
- uint
The last ping value, or 0 if the peer is not on this network.
GetStatistics(IPlayer)
Gets network statistics for a specific player or the entire network.
NetworkStats GetStatistics(IPlayer player = default)
Parameters
playerIPlayerThe player to get statistics for, or
defaultfor the entire network.
Returns
- NetworkStats
The network statistics.
SendPacket(IPlayer, SpanLite<byte>, int, bool)
Sends a packet to a network peer.
bool SendPacket(IPlayer peer, SpanLite<byte> data, int channel, bool dispatchEvents = true)
Parameters
peerIPlayerThe network peer to send the packet to.
dataSpanLite<byte>The data span with the length in bits.
channelintThe channel to use for sending the packet.
dispatchEventsboolWhether to dispatch packet-related events.
Returns
- bool
trueif the packet was sent successfully; otherwise,false.
SendRPC(IPlayer, int, SpanLite<byte>, int, bool)
Sends an RPC to a network peer.
bool SendRPC(IPlayer peer, int id, SpanLite<byte> data, int channel, bool dispatchEvents = true)
Parameters
peerIPlayerThe network peer to send the RPC to.
idintThe RPC ID for the current network.
dataSpanLite<byte>The data span with the length in bits.
channelintThe channel to use for sending the RPC.
dispatchEventsboolWhether to dispatch RPC-related events.
Returns
- bool
trueif the RPC was sent successfully; otherwise,false.
Unban(BanEntry)
Unbans a peer from the network.
void Unban(BanEntry entry)
Parameters
entryBanEntryThe ban entry to remove.
Update()
Updates server parameters.
void Update()