--- lang: ja-jp breaks: true --- # MagicOnion gRPC `Connection id` の取得 2021-10-06  ## サービス側 サービスメソッド内にて ```csharp= using Grpc.Core; ``` ```csharp= public async UnaryResult<int> SumAsync(int x, int y) { string id = base.Context?.CallContext?.GetHttpContext()?.Connection.Id; return x + y; } ``` ###### tags: `MagicOnion` `gRPC` `Connection id`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up