Interface IMessage<TMsg>
Represents a message with an associated identifier that can be parsed from and composed to a packet.
public interface IMessage<TMsg> : IMessage, IParserComposer<TMsg>, IComposer, IParser<TMsg> where TMsg : IMessage<TMsg>
Type Parameters
TMsg
- Inherited Members
Properties
Identifier
Gets the identifier for this message.
public static abstract Identifier Identifier { get; }
Property Value
Identifiers
Gets the target identifiers for this message.
public static Identifier[] Identifiers { get; }
Property Value
Remarks
The default implementation returns an array containing the single Identifier.
SupportedClients
Gets the client types that this message supports.
public static ClientType SupportedClients { get; }
Property Value
UseTargetedIdentifiers
Gets whether each of the identifiers should only intercept on their respective client types.
public static bool UseTargetedIdentifiers { get; }
Property Value
Remarks
The default implementation returns false.
Methods
CreateHandler(InterceptCallback<TMsg>)
Creates an InterceptHandler for the specified InterceptCallback<TMsg> .
public static InterceptHandler CreateHandler(InterceptCallback<TMsg> callback)
Parameters
callback
InterceptCallback<TMsg>
Returns
CreateHandler(InterceptMessageCallback<TMsg>)
Creates an InterceptHandler for the specified InterceptMessageCallback<TMsg> .
public static InterceptHandler CreateHandler(InterceptMessageCallback<TMsg> callback)
Parameters
callback
InterceptMessageCallback<TMsg>
Returns
CreateHandler(MessageCallback<TMsg>)
Creates an InterceptHandler for the specified MessageCallback<TMsg> .
public static InterceptHandler CreateHandler(MessageCallback<TMsg> callback)
Parameters
callback
MessageCallback<TMsg>
Returns
CreateHandler(ModifyMessageCallback<TMsg>)
Creates an InterceptHandler for the specified ModifyMessageCallback<TMsg> .
public static InterceptHandler CreateHandler(ModifyMessageCallback<TMsg> callback)
Parameters
callback
ModifyMessageCallback<TMsg>
Returns
Match(in PacketReader)
Checks whether the specified packet matches this message.
public static bool Match(in PacketReader p)
Parameters
Returns
Remarks
The default implementation returns true.