|
|
|
@ -56,6 +56,9 @@ namespace Grpc.Core.Internal |
|
|
|
|
static extern void grpcsharp_channel_watch_connectivity_state(ChannelSafeHandle channel, ChannelState lastObservedState, |
|
|
|
|
Timespec deadline, CompletionQueueSafeHandle cq, BatchContextSafeHandle ctx); |
|
|
|
|
|
|
|
|
|
[DllImport("grpc_csharp_ext.dll")] |
|
|
|
|
static extern CStringSafeHandle grpcsharp_channel_get_target(ChannelSafeHandle call); |
|
|
|
|
|
|
|
|
|
[DllImport("grpc_csharp_ext.dll")] |
|
|
|
|
static extern void grpcsharp_channel_destroy(IntPtr channel); |
|
|
|
|
|
|
|
|
@ -93,6 +96,14 @@ namespace Grpc.Core.Internal |
|
|
|
|
grpcsharp_channel_watch_connectivity_state(this, lastObservedState, deadline, cq, ctx); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public string GetTarget() |
|
|
|
|
{ |
|
|
|
|
using (var cstring = grpcsharp_channel_get_target(this)) |
|
|
|
|
{ |
|
|
|
|
return cstring.GetValue(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected override bool ReleaseHandle() |
|
|
|
|
{ |
|
|
|
|
grpcsharp_channel_destroy(handle); |
|
|
|
|