LethalNetworkAPI.LethalServerEvent Class
OBSOLETE
This class is deprecated. Please use LNetworkEvent instead.
csharp
public sealed class LethalServerEvent : LethalNetworkAPI.LNetworkEventDepricated
Inheritance
↳ System.Object
↳ LethalNetworkAPI.Old.LethalNetworkDeprecated
↳ LethalNetworkAPI.LNetworkEventDepricated
↳ LethalNetworkAPI.LethalServerEvent
Constructors
LethalServerEvent(string, Action<ulong>) DEPRECATED
Create a new network event for the server.
Declaration
csharp
public LethalServerEvent(string identifier, Action<ulong>? onReceived = null)
Parameters
Type | Name | Description |
---|---|---|
string | identifier | An identifier for the event. |
Action<ulong>? | onReceived | [Opt.] The method to run when an event is received from a client. |
Remarks
Identifiers are specific to a per-mod basis.
Methods
ClearSubscriptions() DEPRECATED
Declaration
csharp
public void ClearSubscriptions()
InvokeAllClients(bool) DEPRECATED
Invoke event to all clients.
Declaration
csharp
public void InvokeAllClients(bool receiveOnHost = true)
Parameters
Type | Name | Description |
---|---|---|
bool | receiveOnHost | [Opt.] Whether the host client should receive as well. |
InvokeClient(ulong) DEPRECATED
Invoke event to a specific client.
Declaration
csharp
public void InvokeClient(ulong clientId)
Parameters
Type | Name | Description |
---|---|---|
ulong | clientId | The client to invoke the event to. |
InvokeClients(IEnumerable<ulong>) DEPRECATED
Invoke event to specific clients.
Declaration
csharp
public void InvokeClients(IEnumerable<ulong> clientIds)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ulong> | clientIds | The clients to invoke the event to. |
Events
OnReceived DEPRECATED
The callback to invoke when an event is received by the server.
Declaration
csharp
public event Action<ulong>? OnReceived;
Type Parameters
Type | Description |
---|---|
ulong | The origin client ID. |