33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using AyCode.Core.Loggers;
|
|
using AyCode.Services.SignalRs;
|
|
|
|
namespace Mango.Sandbox.EndPoints.Tests;
|
|
|
|
/// <summary>
|
|
/// SignalR kliens a Sandbox teszteléshez.
|
|
/// Az AcSignalRClientBase-bõl származik, a GetByIdAsync, GetAllAsync, PostDataAsync, GetAllIntoAsync metódusokat örökli.
|
|
/// </summary>
|
|
public class SignalRClientSandbox : AcSignalRClientBase
|
|
{
|
|
public SignalRClientSandbox(string hubUrl)
|
|
: base(hubUrl, new Logger<SignalRClientSandbox>())
|
|
{
|
|
}
|
|
|
|
//protected override ISignalResponseMessage DeserializeResponseMessage(byte[] messageBytes)
|
|
//{
|
|
// var responseMessage = base.DeserializeResponseMessage(messageBytes);
|
|
// if (responseMessage is SignalResponseJsonMessage jsonMessage)
|
|
// {
|
|
// Console.WriteLine(jsonMessage.ResponseData);
|
|
// }
|
|
// return responseMessage;
|
|
//}
|
|
|
|
protected override Task MessageReceived(int messageTag, byte[] messageBytes)
|
|
{
|
|
Console.WriteLine($"[SignalRClientSandbox] Push message received: tag={messageTag}");
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|