Skip to content

Class MessageReceivedEvent

Namespace: Void.Proxy.Api.Events.Network
Assembly: Void.Proxy.Api.dll

public record MessageReceivedEvent : IScopedEventWithResult<bool>, IScopedEvent, IEventWithResult<bool>, IEvent, IEquatable<MessageReceivedEvent>

Inheritance

objectMessageReceivedEvent

Implements

IScopedEventWithResult<bool>, IScopedEvent, IEventWithResult<bool>, IEvent, IEquatable<MessageReceivedEvent>

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

public MessageReceivedEvent(Side Origin, Side From, Side To, Direction Direction, INetworkMessage Message, ILink Link, IPlayer Player)

Parameters

Origin Side

From Side

To Side

Direction Direction

Message INetworkMessage

Link ILink

Player IPlayer

Properties

Direction

public Direction Direction { get; init; }

Property Value

Direction

From

public Side From { get; init; }

Property Value

Side

public ILink Link { get; init; }

Property Value

ILink

Message

public INetworkMessage Message { get; init; }

Property Value

INetworkMessage

Origin

public Side Origin { get; init; }

Property Value

Side

Player

public IPlayer Player { get; init; }

Property Value

IPlayer

Result

true if packet should not be sent

public bool Result { get; set; }

Property Value

bool

To

public Side To { get; init; }

Property Value

Side

Methods

Cancel()

Cancels an operation if it hasn’t been canceled already. It sets the Result to true upon cancellation.

public bool Cancel()

Returns

bool

Returns true if the operation was already canceled; otherwise, returns false.