20 lines
489 B
C#
20 lines
489 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Server.Networking.Handling;
|
|
|
|
public interface IClientMessageHandler
|
|
{
|
|
// Which opcodes this handler will process
|
|
IReadOnlyCollection<int> SupportedOpCodes { get; }
|
|
|
|
// Handle a single incoming message
|
|
Task HandleAsync(
|
|
int opCode,
|
|
IConnection connection,
|
|
ReadOnlyMemory<byte> payload,
|
|
CancellationToken cancellationToken);
|
|
}
|