Skip to content

Class MessageReceivedEvent

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

Represents a network message after it has been read and before it is forwarded to its next processing stage.

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

Represents a network message after it has been read and before it is forwarded to its next processing stage.

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

Parameters

Origin Side

The side from which the message originally entered the proxy pipeline.

From Side

The side that produced the message for the current processing stage.

To Side

The side receiving the message in the current processing stage.

Direction Direction

The protocol direction in which the message is traveling.

Message INetworkMessage

The decoded or raw network message being processed.

Link ILink

The link carrying the message.

Player IPlayer

The player associated with the message.

Properties

Direction

The protocol direction in which the message is traveling.

public Direction Direction { get; init; }

Property Value

Direction

From

The side that produced the message for the current processing stage.

public Side From { get; init; }

Property Value

Side

The link carrying the message.

public ILink Link { get; init; }

Property Value

ILink

Message

The decoded or raw network message being processed.

public INetworkMessage Message { get; init; }

Property Value

INetworkMessage

Origin

The side from which the message originally entered the proxy pipeline.

public Side Origin { get; init; }

Property Value

Side

Player

The player associated with the message.

public IPlayer Player { get; init; }

Property Value

IPlayer

Result

Gets or sets whether forwarding the message is canceled.

public bool Result { get; set; }

Property Value

bool

To

The side receiving the message in the current processing stage.

public Side To { get; init; }

Property Value

Side

Methods

Cancel()

Cancels forwarding if it has not already been canceled.

public bool Cancel()

Returns

bool

true when forwarding was already canceled; otherwise, false after setting .