guerro323 / GameHost

MIT License
0 stars 0 forks source link

Bump MagicOnion from 4.1.1 to 4.2.0 #87

Closed dependabot[bot] closed 3 years ago

dependabot[bot] commented 3 years ago

Bumps MagicOnion from 4.1.1 to 4.2.0.

Release notes

Sourced from MagicOnion's releases.

Ver.4.2.0

New Features

Unity: Introduce gRPC channel management integration #414

Wraps gRPC channels and provides a mechanism to manage them with Unity's lifecycle. This prevents your application and the Unity Editor from freezing by releasing channels and StreamingHub in one place.

The editor extension also provides the ability to display the communication status of channels.

Screen08

NOTE: The data rate is calculated only for the message body of methods, and does not include Headers, Trailers, or Keep-alive pings.

New APIs

MagicOnion.GrpcChannelx class

  • GrpcChannelx.FromTarget(GrpcChannelTarget) method
  • GrpcChannelx.FromAddress(Uri) method

MagicOnion.Unity.GrpcChannelProviderHost class

  • GrpcChannelProviderHost.Initialize(IGrpcChannelProvider) method

MagicOnion.Unity.IGrpcChannelProvider interface

  • DefaultGrpcChannelProvider class
  • LoggingGrpcChannelProvider class

Usages

1. Prepare to use GrpcChannelx in your Unity project.

Before creating a channel in your application, you need to initialize the provider host to be managed.

[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
public static void OnRuntimeInitialize()
{
    // Initialize gRPC channel provider when the application is loaded.
    GrpcChannelProviderHost.Initialize(new DefaultGrpcChannelProvider(new []
    {
        // send keepalive ping every 5 second, default is 2 hours
        new ChannelOption("grpc.keepalive_time_ms", 5000),
        // keepalive ping time out after 5 seconds, default is 20 seconds
        new ChannelOption("grpc.keepalive_timeout_ms", 5 * 1000),
    }));
}

GrpcChannelProviderHost will be created as DontDestroyOnLoad and keeps existing while the application is running. DO NOT destory it.

image

2. Use GrpcChannelx.FromTarget or GrpcChannelx.FromAddress to create a channel.

Use GrpcChannelx.FromTarget or GrpcChannelx.FromAddress to create a channel instead of new Channel(...).

var channel = GrpcChannelx.FromTarget(new GrpcChannelTarget("localhost", 12345, ChannelCredentials.Insecure));
</tr></table> 

... (truncated)

Commits
  • d05c2f7 feat: Update package.json to 4.2.0
  • e4a9266 Update README.md [skip ci]
  • ef0f038 Merge pull request #419 from Cysharp/hotfix/FixGeneratorForStreamingHubGenerics
  • 7afdb8e Fix handling of Generics for StreamingHub code generation
  • b8fa629 Verify if the generated codes can be compiled successfully.
  • 2efee0a Merge pull request #410 from Cysharp/chore/image
  • 6bced65 Merge pull request #414 from Cysharp/feature/GrpcChannelProvider
  • c7609f8 Merge pull request #416 from Cysharp/improve-streminghub-performance
  • 1cfb05d Bump version [skip ci]
  • fde2c97 Fix typo
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 3 years ago

Superseded by #91.