MyGit

6.1.0

Cysharp/MagicOnion

版本发布时间: 2024-03-21 14:37:04

Cysharp/MagicOnion最新发布版本:6.1.4(2024-07-17 15:51:31)

Features

Add StreamingHub OnConnected support by @riversdark0 in https://github.com/Cysharp/MagicOnion/pull/745

Introduced the event OnConnected after a connection is established with a client on the server's StreamingHub.

This differs from OnConnecting in that the client is notified that the connection is complete and can then communicate via Broadcast.

Allow DynamicArgumentTuple as a reference type on Unity in https://github.com/Cysharp/MagicOnion/pull/747

This PR allows DynamicArgumentTuple as a reference type on Unity.

Unity IL2CPP builds often have issues with the code size due to generics and value types. MAGICONION_USE_REFTYPE_DYNAMICARGUMENTTUPLE build constant allows DynamicArgumentTuple to be treated as a reference type.

[Preview] Introduce IStreamingHubDiagnosticHandler in https://github.com/Cysharp/MagicOnion/pull/746

This PR introduces an API for diagnosing and tracing the communication of StreamingHub. The API is in preview and may be subject to change in the future.

This API only supports the Source Generator at this moment and you need to set the EnableStreamingHubDiagnosticHandler option to true in the generation options. By setting this option, the StreamingHubDiagnosticHandler property will be added to the generated class, allowing you to set a handler.

namespace MagicOnion.Client;

/// <summary>
/// [Preview] The interface of the handler for StreamingHub diagnostics. This API may change in the future.
/// </summary>
public interface IStreamingHubDiagnosticHandler
{
    /// <summary>
    /// The callback method at the beginning of a Hub method request. This API may change in the future.
    /// </summary>
    void OnRequestBegin<THub, TRequest>(THub hubInstance, Guid requestId, string methodName, TRequest request, bool isFireAndForget);

    /// <summary>
    /// [Preview] The callback method at the end of a Hub method request. This API may change in the future.
    /// </summary>
    void OnRequestEnd<THub, TResponse>(THub hubInstance, Guid requestId, string methodName, TResponse response);

    /// <summary>
    /// [Preview] The callback method when a method of HubReceiver is invoked. This API may change in the future.
    /// </summary>
    void OnBroadcastEvent<THub, T>(THub hubInstance, string methodName, T value);
}

What's Changed

Breaking Changes

Other Changes

New Contributors

Full Changelog: https://github.com/Cysharp/MagicOnion/compare/6.0.1...6.1.0

相关地址:原始地址 下载(tar) 下载(zip)

1、 MagicOnion.Client.Unity.unitypackage 267.33KB

查看:2024-03-21发行的版本