Skip to content

Commit 2f814e3

Browse files
committed
Add Daemon service to MutagenClient
1 parent 9ba0610 commit 2f814e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

MutagenSdk/MutagenClient.cs

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Coder.Desktop.MutagenSdk.Proto.Service.Daemon;
12
using Coder.Desktop.MutagenSdk.Proto.Service.Synchronization;
23
using Grpc.Core;
34
using Grpc.Net.Client;
@@ -8,6 +9,7 @@ public class MutagenClient : IDisposable
89
{
910
private readonly GrpcChannel _channel;
1011

12+
public readonly Daemon.DaemonClient Daemon;
1113
public readonly Synchronization.SynchronizationClient Synchronization;
1214

1315
public MutagenClient(string dataDir)
@@ -39,11 +41,15 @@ public MutagenClient(string dataDir)
3941
ConnectCallback = connectionFactory.ConnectAsync,
4042
};
4143

44+
// http://localhost is fake address. The HttpHandler will be used to
45+
// open a socket to the named pipe.
4246
_channel = GrpcChannel.ForAddress("http://localhost", new GrpcChannelOptions
4347
{
4448
Credentials = ChannelCredentials.Insecure,
4549
HttpHandler = socketsHttpHandler,
4650
});
51+
52+
Daemon = new Daemon.DaemonClient(_channel);
4753
Synchronization = new Synchronization.SynchronizationClient(_channel);
4854
}
4955

0 commit comments

Comments
 (0)