~ruther/NosSmooth

ref: 1b7ad333ea54fd9e46dc20b9adcd478f315ed1b0 NosSmooth/Samples/PacketInterceptor/TestResponder.cs -rw-r--r-- 591 bytes
1b7ad333 — František Boháček chore: add documentation for move packet 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using NosCore.Packets.Interfaces;
using NosCore.Packets.ServerPackets.MiniMap;
using NosSmooth.Core.Client;
using NosSmooth.Core.Packets;
using Remora.Results;

namespace PacketInterceptor;

public class TestResponder : IEveryPacketResponder
{
    private readonly INostaleClient _client;

    public TestResponder(INostaleClient client)
    {
        _client = client;
    }
    
    public async Task<Result> Respond<TPacket>(TPacket packet, CancellationToken ct = default) where TPacket : IPacket
    {
        return await _client.SendPacketAsync("test");
    }
}
Do not follow this link